Force rasterized (bitmap) drawing for vector graphics output. Rasterized drawing is not supported by all artists. If you try to enable this on an artist that does not support it, the command has no effect and a warning will be issued. This setting is ignore
(self, rasterized)
| 997 | return self._rasterized |
| 998 | |
| 999 | def set_rasterized(self, rasterized): |
| 1000 | """ |
| 1001 | Force rasterized (bitmap) drawing for vector graphics output. |
| 1002 | |
| 1003 | Rasterized drawing is not supported by all artists. If you try to |
| 1004 | enable this on an artist that does not support it, the command has no |
| 1005 | effect and a warning will be issued. |
| 1006 | |
| 1007 | This setting is ignored for pixel-based output. |
| 1008 | |
| 1009 | See also :doc:`/gallery/misc/rasterization_demo`. |
| 1010 | |
| 1011 | Parameters |
| 1012 | ---------- |
| 1013 | rasterized : bool |
| 1014 | """ |
| 1015 | supports_rasterization = getattr(self.draw, |
| 1016 | "_supports_rasterization", False) |
| 1017 | if rasterized and not supports_rasterization: |
| 1018 | _api.warn_external(f"Rasterization of '{self}' will be ignored") |
| 1019 | |
| 1020 | self._rasterized = rasterized |
| 1021 | |
| 1022 | def get_agg_filter(self): |
| 1023 | """Return filter function to be used for agg filter.""" |
no outgoing calls