@@ -571,15 +571,13 @@ def _set_pixel(self):
571571 self ._transform = Affine2D ().translate (- 0.49999 , - 0.49999 )
572572 self ._snap_threshold = None
573573
574- _triangle_path = Path ([[0 , 1 ], [- 1 , - 1 ], [1 , - 1 ], [ 0 , 1 ]], closed = True )
574+ _triangle_path = Path . _create_closed ([[0 , 1 ], [- 1 , - 1 ], [1 , - 1 ]] )
575575 # Going down halfway looks to small. Golden ratio is too far.
576- _triangle_path_u = Path ([[0 , 1 ], [- 3 / 5 , - 1 / 5 ], [3 / 5 , - 1 / 5 ], [0 , 1 ]],
577- closed = True )
578- _triangle_path_d = Path (
579- [[- 3 / 5 , - 1 / 5 ], [3 / 5 , - 1 / 5 ], [1 , - 1 ], [- 1 , - 1 ], [- 3 / 5 , - 1 / 5 ]],
580- closed = True )
581- _triangle_path_l = Path ([[0 , 1 ], [0 , - 1 ], [- 1 , - 1 ], [0 , 1 ]], closed = True )
582- _triangle_path_r = Path ([[0 , 1 ], [0 , - 1 ], [1 , - 1 ], [0 , 1 ]], closed = True )
576+ _triangle_path_u = Path ._create_closed ([[0 , 1 ], [- 3 / 5 , - 1 / 5 ], [3 / 5 , - 1 / 5 ]])
577+ _triangle_path_d = Path ._create_closed (
578+ [[- 3 / 5 , - 1 / 5 ], [3 / 5 , - 1 / 5 ], [1 , - 1 ], [- 1 , - 1 ]])
579+ _triangle_path_l = Path ._create_closed ([[0 , 1 ], [0 , - 1 ], [- 1 , - 1 ]])
580+ _triangle_path_r = Path ._create_closed ([[0 , 1 ], [0 , - 1 ], [1 , - 1 ]])
583581
584582 def _set_triangle (self , rot , skip ):
585583 self ._transform = Affine2D ().scale (0.5 ).rotate_deg (rot )
@@ -901,14 +899,12 @@ def _set_x(self):
901899 self ._filled = False
902900 self ._path = self ._x_path
903901
904- _plus_filled_path = Path (
905- np .array ([(- 1 , - 3 ), (+ 1 , - 3 ), (+ 1 , - 1 ), (+ 3 , - 1 ), (+ 3 , + 1 ), (+ 1 , + 1 ),
906- (+ 1 , + 3 ), (- 1 , + 3 ), (- 1 , + 1 ), (- 3 , + 1 ), (- 3 , - 1 ), (- 1 , - 1 ),
907- (- 1 , - 3 )]) / 6 , closed = True )
908- _plus_filled_path_t = Path (
909- np .array ([(+ 3 , 0 ), (+ 3 , + 1 ), (+ 1 , + 1 ), (+ 1 , + 3 ),
910- (- 1 , + 3 ), (- 1 , + 1 ), (- 3 , + 1 ), (- 3 , 0 ),
911- (+ 3 , 0 )]) / 6 , closed = True )
902+ _plus_filled_path = Path ._create_closed (np .array ([
903+ (- 1 , - 3 ), (+ 1 , - 3 ), (+ 1 , - 1 ), (+ 3 , - 1 ), (+ 3 , + 1 ), (+ 1 , + 1 ),
904+ (+ 1 , + 3 ), (- 1 , + 3 ), (- 1 , + 1 ), (- 3 , + 1 ), (- 3 , - 1 ), (- 1 , - 1 )]) / 6 )
905+ _plus_filled_path_t = Path ._create_closed (np .array ([
906+ (+ 3 , 0 ), (+ 3 , + 1 ), (+ 1 , + 1 ), (+ 1 , + 3 ),
907+ (- 1 , + 3 ), (- 1 , + 1 ), (- 3 , + 1 ), (- 3 , 0 )]) / 6 )
912908
913909 def _set_plus_filled (self ):
914910 self ._transform = Affine2D ()
@@ -924,15 +920,12 @@ def _set_plus_filled(self):
924920 {'top' : 0 , 'left' : 90 , 'bottom' : 180 , 'right' : 270 }[fs ])
925921 self ._alt_transform = self ._transform .frozen ().rotate_deg (180 )
926922
927- _x_filled_path = Path (
928- np .array ([(- 1 , - 2 ), (0 , - 1 ), (+ 1 , - 2 ), (+ 2 , - 1 ), (+ 1 , 0 ), (+ 2 , + 1 ),
929- (+ 1 , + 2 ), (0 , + 1 ), (- 1 , + 2 ), (- 2 , + 1 ), (- 1 , 0 ), (- 2 , - 1 ),
930- (- 1 , - 2 )]) / 4 ,
931- closed = True )
932- _x_filled_path_t = Path (
933- np .array ([(+ 1 , 0 ), (+ 2 , + 1 ), (+ 1 , + 2 ), (0 , + 1 ),
934- (- 1 , + 2 ), (- 2 , + 1 ), (- 1 , 0 ), (+ 1 , 0 )]) / 4 ,
935- closed = True )
923+ _x_filled_path = Path ._create_closed (np .array ([
924+ (- 1 , - 2 ), (0 , - 1 ), (+ 1 , - 2 ), (+ 2 , - 1 ), (+ 1 , 0 ), (+ 2 , + 1 ),
925+ (+ 1 , + 2 ), (0 , + 1 ), (- 1 , + 2 ), (- 2 , + 1 ), (- 1 , 0 ), (- 2 , - 1 )]) / 4 )
926+ _x_filled_path_t = Path ._create_closed (np .array ([
927+ (+ 1 , 0 ), (+ 2 , + 1 ), (+ 1 , + 2 ), (0 , + 1 ),
928+ (- 1 , + 2 ), (- 2 , + 1 ), (- 1 , 0 )]) / 4 )
936929
937930 def _set_x_filled (self ):
938931 self ._transform = Affine2D ()
0 commit comments