File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -741,7 +741,8 @@ def draw(self, renderer):
741
741
# position in Text, and dash position in TextWithDash:
742
742
posx = float (textobj .convert_xunits (textobj ._x ))
743
743
posy = float (textobj .convert_yunits (textobj ._y ))
744
-
744
+ if not np .isfinite (posx ) or not np .isfinite (posy ):
745
+ raise ValueError ("posx and posy should be finite values" )
745
746
posx , posy = trans .transform_point ((posx , posy ))
746
747
canvasw , canvash = renderer .get_canvas_width_height ()
747
748
@@ -760,8 +761,6 @@ def draw(self, renderer):
760
761
angle = textobj .get_rotation ()
761
762
762
763
for line , wh , x , y in info :
763
- if not np .isfinite (x ) or not np .isfinite (y ):
764
- continue
765
764
766
765
mtext = textobj if len (info ) == 1 else None
767
766
x = x + posx
You can’t perform that action at this time.
0 commit comments