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 support to drawing text with gradient brush (piet-coregraphics) #210

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

brunogouveia
Copy link
Contributor

Hey guys, I was looking into adding support to Core Graphics backend a few months ago (https://github.com/brunogouveia/piet/commits/piet-core-graphics), but I never had the time to finish.

I looked into the current core graphics backend implementation and I noticed text rendering with gradient brushes was missing, so I created this PR adding gradient support, that uses the same approach I used on my branch: set text drawing mode to clip and render the gradient afterwards.

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

Amazing, I didn't know about this API and was disheartened at how much work it seemed like this would be. Very happy to learn otherwise, thanks!

.gitignore Outdated Show resolved Hide resolved
@cmyr cmyr merged commit 7920c3d into linebender:master Jun 11, 2020
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.

2 participants