File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Filter options
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):
26
26
# its draw method is explicitly decorated). If it is being drawn after a
27
27
# rasterized artist and it has reached a raster_depth of 0, we stop
28
28
# 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).
35
30
36
31
@wraps (draw )
37
32
def draw_wrapper (artist , renderer ):
@@ -131,7 +126,9 @@ class Artist:
131
126
def __init_subclass__ (cls ):
132
127
133
128
# 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.
135
132
136
133
if not hasattr (cls .draw , "_supports_rasterization" ):
137
134
cls .draw = _prevent_rasterization (cls .draw )
You can’t perform that action at this time.
0 commit comments