@@ -17,10 +17,10 @@ public static void SaveLogo(float size, string path)
1717 // the point are based on a 1206x1206 shape so size requires scaling from there
1818 float scalingFactor = size / 1206 ;
1919
20- var center = new Vector2 ( 603 ) ;
20+ Vector2 center = new ( 603 ) ;
2121
2222 // segment whose center of rotation should be
23- var segmentOffset = new Vector2 ( 301.16968f , 301.16974f ) ;
23+ Vector2 segmentOffset = new ( 301.16968f , 301.16974f ) ;
2424 IPath segment = new Polygon (
2525 new LinearLineSegment ( new Vector2 ( 230.54f , 361.0261f ) , new Vector2 ( 5.8641942f , 361.46031f ) ) ,
2626 new CubicBezierLineSegment (
@@ -30,28 +30,28 @@ public static void SaveLogo(float size, string path)
3030 new Vector2 ( 78.26f , 97.0461f ) ) ) . Translate ( center - segmentOffset ) ;
3131
3232 // we need to create 6 of theses all rotated about the center point
33- var segments = new List < IPath > ( ) ;
33+ List < IPath > segments = [ ] ;
3434 for ( int i = 0 ; i < 6 ; i ++ )
3535 {
3636 float angle = i * ( ( float ) Math . PI / 3 ) ;
3737 IPath s = segment . Transform ( Matrix3x2 . CreateRotation ( angle , center ) ) ;
3838 segments . Add ( s ) ;
3939 }
4040
41- var colors = new List < Color > ( )
42- {
41+ List < Color > colors =
42+ [
4343 Color . ParseHex ( "35a849" ) ,
4444 Color . ParseHex ( "fcee21" ) ,
4545 Color . ParseHex ( "ed7124" ) ,
4646 Color . ParseHex ( "cb202d" ) ,
4747 Color . ParseHex ( "5f2c83" ) ,
48- Color . ParseHex ( "085ba7" ) ,
49- } ;
48+ Color . ParseHex ( "085ba7" )
49+ ] ;
5050
51- var scaler = Matrix3x2 . CreateScale ( scalingFactor , Vector2 . Zero ) ;
51+ Matrix3x2 scaler = Matrix3x2 . CreateScale ( scalingFactor , Vector2 . Zero ) ;
5252
5353 int dimensions = ( int ) Math . Ceiling ( size ) ;
54- using ( var img = new Image < Rgba32 > ( dimensions , dimensions ) )
54+ using ( Image < Rgba32 > img = new ( dimensions , dimensions ) )
5555 {
5656 img . Mutate ( i => i . Fill ( Color . Black ) ) ;
5757 img . Mutate ( i => i . Fill ( Color . ParseHex ( "e1e1e1ff" ) , new EllipsePolygon ( center , 600f ) . Transform ( scaler ) ) ) ;
@@ -62,7 +62,7 @@ public static void SaveLogo(float size, string path)
6262 img . Mutate ( i => i . Fill ( colors [ s ] , segments [ s ] . Transform ( scaler ) ) ) ;
6363 }
6464
65- img . Mutate ( i => i . Fill ( new Rgba32 ( 0 , 0 , 0 , 170 ) , new ComplexPolygon ( new EllipsePolygon ( center , 161f ) , new EllipsePolygon ( center , 61f ) ) . Transform ( scaler ) ) ) ;
65+ img . Mutate ( i => i . Fill ( Color . FromPixel ( new Rgba32 ( 0 , 0 , 0 , 170 ) ) , new ComplexPolygon ( new EllipsePolygon ( center , 161f ) , new EllipsePolygon ( center , 61f ) ) . Transform ( scaler ) ) ) ;
6666
6767 string fullPath = System . IO . Path . GetFullPath ( System . IO . Path . Combine ( "Output" , path ) ) ;
6868
0 commit comments