Commit Graph

11842 Commits

Author SHA1 Message Date
Matthias Clasen 4816be9ab5 Work around cairo limitations
If we just draw an image, cairos recording surface
complains that it is unbounded. Its not true of course.

To make things work, clip to the extents.
2022-12-24 09:16:29 -05:00
Behdad Esfahbod f7eebc397c [paint-extents] Shorten enum addressing 2022-12-23 18:52:46 -07:00
Behdad Esfahbod 0110bdb3ea [paint-extents] Streamline extents_t more 2022-12-23 18:17:05 -07:00
Behdad Esfahbod 9f3e050b99 [paint-extents] Streamline extents_t 2022-12-23 18:15:21 -07:00
Behdad Esfahbod 0d129ae308 Fix warning 2022-12-23 18:00:38 -07:00
Behdad Esfahbod 73e48b9357 [colr] Push clipbox or computed clip 2022-12-23 17:55:09 -07:00
Behdad Esfahbod 02684751bd [paint-extents] Clean up 2022-12-23 17:33:13 -07:00
Behdad Esfahbod dbea503a38 [colr] Return true extents 2022-12-23 17:28:46 -07:00
Behdad Esfahbod f9c2e30e01 [paint-extents] Better handle empty glyphs 2022-12-23 17:13:35 -07:00
Matthias Clasen 885dbcfba0 Skip empty outlines 2022-12-23 19:07:32 -05:00
Behdad Esfahbod bd61e645ff [paint-extents] Use hb_min/hb_max 2022-12-23 16:59:12 -07:00
Behdad Esfahbod 56a48f8b0a [paint] Don't use extents in hb-view
Let the clipbox do its magic. Currently works for ft backend only.
2022-12-23 16:45:04 -07:00
Matthias Clasen 79229cea17 Get outline extents manually 2022-12-23 18:41:24 -05:00
Behdad Esfahbod 47c896f004 [paint-extents] Hook it up, kinda 2022-12-23 16:25:36 -07:00
Behdad Esfahbod 7fbaaebe8b [paint-extents] Finish off
Untested and unused.
2022-12-23 15:57:05 -07:00
Behdad Esfahbod 8ca78d1520 [paint-extend] More 2022-12-23 15:21:48 -07:00
Behdad Esfahbod 23a2d4dbab [paint-extents] More 2022-12-23 15:11:45 -07:00
Behdad Esfahbod d7435b1009 [paint-extents] Flesh out more 2022-12-23 15:05:30 -07:00
Behdad Esfahbod c37a1eadef [paint-extents] Flesh out some more 2022-12-23 14:57:12 -07:00
Behdad Esfahbod 268d8b7ded [paint-extents] Start out 2022-12-23 14:45:56 -07:00
Behdad Esfahbod d9875ddc9d [ft-colr] Add depth counter 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 583f010b05 [ft] Move lock only around clip_glyph 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 2762903909 [ft-colr] Minor 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 3a1385f019 [ft-colr] Simplify color-stop callback 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 1cc3b10008 [ft-colr] Ifdef build for older freetype 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 882c2bca2d [ft-colr] Add a paint context 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 7a4b4c64f2 [ft-colr] Minor macro 2022-12-23 13:37:59 -07:00
Behdad Esfahbod c453c2fce9 [ft-colr] Fix color-stop iteration 2022-12-23 13:37:59 -07:00
Matthias Clasen bbb89e62aa [paint] Document color lines as transient
Just so people don't get ideas.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod 15582d5fc1 [ft-colr] Apply slant to clipbox 2022-12-23 13:37:59 -07:00
Matthias Clasen 7abd5dcf10 [ft-paint] Fix handling of colorstop iters 2022-12-23 13:37:59 -07:00
Matthias Clasen 393bab4ba1 [ft-paint] Apply ClipBox to all glyphs 2022-12-23 13:37:59 -07:00
Matthias Clasen c11ae85cbf [ft-paint] Apply root transform 2022-12-23 13:37:59 -07:00
Matthias Clasen 7fc3fdac76 [ft-paint] Optimize away some transforms 2022-12-23 13:37:59 -07:00
Matthias Clasen 586d1758c1 [ft-paint] Fix an oversight 2022-12-23 13:37:59 -07:00
Matthias Clasen 092637f94c [ft-paint] Fix rounding 2022-12-23 13:37:59 -07:00
Matthias Clasen fe08e956e0 [ft-paint] Fix a case of x/y confusion 2022-12-23 13:37:59 -07:00
Matthias Clasen 0d5256e5a7 [ft-paint] Fix some fixed->float conversions 2022-12-23 13:37:59 -07:00
Matthias Clasen 07ba5be393 [paint] Documentation tweaks 2022-12-23 13:37:59 -07:00
Matthias Clasen 21f78c8774 [paint] Document that colors are unpremultiplied
And mention that gradient interpolation must happen
in premultiplied space.
2022-12-23 13:37:59 -07:00
Matthias Clasen b6e98cf758 [colr] Add more docs
State explicitly that palette entries are
unpremultipled, and link to the spec.
2022-12-23 13:37:59 -07:00
Matthias Clasen a634f6b486 [colr] Add more docs
State explicitly that palette entries are
unpremultipled, and link to the spec.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod a02c2a911c [ft-paint] Apply alpha correctly 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 6ebcc9d2e1 [ft-paint] Hook up gradients 2022-12-23 13:37:59 -07:00
Behdad Esfahbod fe4e9bd930 [colr] Add public vtable for hb_color_line_t 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 7c9e42ed92 [colr] Fix transform hell 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 569d5b436c [ft-paint] Remove dead code 2022-12-23 13:37:59 -07:00
Behdad Esfahbod cfdc34b44d [ft-paint] Implement FT_COLR_PAINTFORMAT_SKEW 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 64cf17ec8b [ft-paint] Fix center translation 2022-12-23 13:37:59 -07:00
Behdad Esfahbod ddbe4e52ec [ft-paint] Implement FT_COLR_PAINTFORMAT_ROTATE 2022-12-23 13:37:59 -07:00