-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
WebAgg backend #1426
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
WebAgg backend #1426
Changes from all commits
dd32575
31479e6
2f9c992
021d74d
914e525
0c99763
6e735d5
d9e68a4
8193feb
5efca62
bf11a13
8f414b4
788c8c9
d977828
499a960
c5479c2
ae884b0
1789f6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1482,6 +1482,8 @@ class FigureCanvasBase(object): | |
'close_event' | ||
] | ||
|
||
supports_blit = True | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if it should be the other way around: By default a backend cannot blit, but if you implement the functionality, and toggle the switch, you get it... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's possible -- I was just trying to be backward compatible here with third-party backends that don't currently implement this value. |
||
|
||
def __init__(self, figure): | ||
figure.set_canvas(self) | ||
self.figure = figure | ||
|
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.
This seems a little unfriendly. If I ask for blitting, I would expect to get it - otherwise I should get an error. What do you think?
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.
This deserves some explanation. Some backends, such as WebAgg, do not support blitting. In the case of WebAgg, it's because blitting is not possible -- we don't have direct access to the window/screen buffers anyway, so there is no advantage to it. This allows code that was written to expect blitting (such as all of the
examples/animation
examples) to still work. There should be consistent behavior across backends, even when certain features are not available.