← 输入框|github.com|刷新
Skip to content

backends: fix alpha handling for cairo and macosx - #437

Merged
efiring merged 1 commit into
matplotlib:masterfrom
efiring:new_gc_alpha
Aug 27, 2011
Merged

efiring merged 1 commit into
matplotlib:masterfrom
efiring:new_gc_alpha

Conversation

@efiring

@efiring efiring commented Aug 27, 2011

Copy link
Copy Markdown
Member

There are two parts to this change. First, the cairo
and macosx backends recycle the graphics context instead
of making a new one with the new_gc() method, so the _alpha
attribute must be reset to 1 at that point. Second, the
GraphicsContextBase.set_foreground() method needs to call
the set_alpha method instead of setting the _alpha attribute,
so that the subclass method is called.

There are two parts to this change.  First, the cairo
and macosx backends recycle the graphics context instead
of making a new one with the new_gc() method, so the _alpha
attribute must be reset to 1 at that point.  Second, the
GraphicsContextBase.set_foreground() method needs to call
the set_alpha method instead of setting the _alpha attribute,
so that the subclass method is called.
efiring added a commit that referenced this pull request Aug 27, 2011
backends: fix alpha handling for cairo and macosx
@efiring
efiring merged commit fa483d7 into matplotlib:master Aug 27, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant