Skip to content
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

Add Brush classes #689

Merged
merged 11 commits into from
Mar 9, 2021
Merged

Add Brush classes #689

merged 11 commits into from
Mar 9, 2021

Conversation

corranwebster
Copy link
Contributor

These are classes intended to make it easier to paint and style filled regions. This PR simply adds the classes and an example of usage.

Subsequent PRs will integrate this into existing code (eg. to add a background brush class to the base component).

This permits sharing of gradients between brushes, and also the potential
to grow a better Gradient api in the future - eg. adding methods for formal
operations that keep gradient invariants preserved: add stop, remove stop,
reverse, etc.
enable/brush.py Outdated Show resolved Hide resolved
@corranwebster
Copy link
Contributor Author

There's bits of the gradient example which could be pulled out and either added to the gradient object itself, or turned into more general things. But for now an example is good enough.

Copy link
Member

@jwiggins jwiggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple comments, but this is otherwise 👍

enable/brush.py Show resolved Hide resolved
enable/brush.py Outdated Show resolved Hide resolved
@corranwebster
Copy link
Contributor Author

Assuming that tests pass, this is good to go.

@corranwebster corranwebster merged commit dc41fd8 into master Mar 9, 2021
@corranwebster corranwebster deleted the feat/brushes branch March 9, 2021 22:01
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.

None yet

2 participants