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):
741741 # position in Text, and dash position in TextWithDash:
742742 posx = float (textobj .convert_xunits (textobj ._x ))
743743 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" )
745746 posx , posy = trans .transform_point ((posx , posy ))
746747 canvasw , canvash = renderer .get_canvas_width_height ()
747748
@@ -760,8 +761,6 @@ def draw(self, renderer):
760761 angle = textobj .get_rotation ()
761762
762763 for line , wh , x , y in info :
763- if not np .isfinite (x ) or not np .isfinite (y ):
764- continue
765764
766765 mtext = textobj if len (info ) == 1 else None
767766 x = x + posx
You can’t perform that action at this time.
0 commit comments