File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,7 @@ def _prevent_rasterization(draw):
2626 # its draw method is explicitly decorated). If it is being drawn after a
2727 # rasterized artist and it has reached a raster_depth of 0, we stop
2828 # rasterization so that it does not affect the behavior of normal artist
29- # (e.g., change in dpi). If the artist's draw method is decorated (has a
30- # `_supports_rasterization` attribute), it won't be decorated by
31- # `_prevent_rasterization`.
32-
33- if hasattr (draw , "_supports_rasterization" ):
34- return draw
29+ # (e.g., change in dpi).
3530
3631 @wraps (draw )
3732 def draw_wrapper (artist , renderer ):
@@ -131,7 +126,9 @@ class Artist:
131126 def __init_subclass__ (cls ):
132127
133128 # Decorate draw() method so that all artists are able to stop
134- # rastrization when necessary.
129+ # rastrization when necessary. If the artist's draw method is already
130+ # decorated (has a `_supports_rasterization` attribute), it won't be
131+ # decorated.
135132
136133 if not hasattr (cls .draw , "_supports_rasterization" ):
137134 cls .draw = _prevent_rasterization (cls .draw )
You can’t perform that action at this time.
0 commit comments