-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve documentation on rasterization #18969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a22d219
to
761e745
Compare
761e745
to
91dbde8
Compare
|
||
Defaults to None, which implies the backend's default behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICS, there is no explicit "backend's default behavior". The mechanism seems entirely controlled by the Artist's draw
method (via @allow_rasterization
). The backend/renderer only implements start_rasterizing
/ stop_rasterizing
(or not if thy do not support rasterization, which leaves these functions as no-ops).
The only "default" is that pixel-based backends ignore this setting, and vector backends respect it.
Also, it seems that the value of None is never checked explicitly, but we only have a a truthy comparison if self._rasterized
. Therefore, we make this a real bool parameter. - Would need to change the default init value as well, which is a non-doc change, and if we wanted to be nit-picky also is an API change, because get_rasterized
would return another value. So I leave this for another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that this wording means "in Agg we _always_rasterize, in svg the default is to emit vector data", i.e. the default value is to do what ever the backend does (at least that is how I have always read).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 "backend's default behavior" is still a bit weird wording. To me, "default" implies that one can configure it to something else.
Anyway, the wording is gone. And a possible removal of None is for another PR.
91dbde8
to
b89eaf8
Compare
b89eaf8
to
f352d20
Compare
Co-authored-by: Elliott Sales de Andrade <[email protected]>
Co-authored-by: Elliott Sales de Andrade <[email protected]>
I've committed @QuLogic's changes via GitHub interface. Please squash-merge. |
PR Summary
Inspired by, but independent of #18956.