-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Apply ColorTransform directly when rendering text and shapes #1246
Conversation
Added some ColorTransforms to my little test program here Before this patch, the ColorTransforms change nothing on targets other than Flash: |
I just discovered that changing the Edit: fixed |
7cf7ee4
to
d3afc19
Compare
This patch refactors and de-duplicates code in the Cairo and Canvas rendering classes and implements the application of color transforms to TextFields and (Shape) Graphics. It introduces 2 new macros to ColorTransform that help calculate the RGBA values without temporary allocations. If and when Haxe supports multiple inline return values, these could be rewritten. Drawing Bitmaps with ColorTransform is untested and not implemented by this patch.
Discovered a copy-pasta error in |
…on uses for these unique events)" This reverts commit c0511ab.
…for these unique events)
Reopened as #1251 because I keep pushing to this branch :/ |
This patch refactors and de-duplicates code in the Cairo and Canvas rendering classes and implements the application of color transforms to TextFields and (Shape) Graphics.
Luckily worldColorTransform was already implemented so it turned out to be fairly straightforward :-)
It introduces 2 new macros to ColorTransform that help calculate the RGBA values without temporary allocations. If and when Haxe supports multiple inline return values, these could be rewritten. Hopefully you'll find these readable enough... :)
Drawing Bitmaps with ColorTransform is untested and not implemented by this patch.