Behdad Esfahbod
75e6498d9a
Don't use M_PI
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/4166
Happy Pi Day!
2023-03-14 12:41:46 -06:00
Behdad Esfahbod
2accbdc0b6
[paint] Minor skew
2023-01-25 14:40:04 -07:00
Behdad Esfahbod
626f8e4de3
[paint] Fix skew to match Chrome
2023-01-25 14:33:46 -07:00
Behdad Esfahbod
638e0ed4fd
[paint] Overlay custom-palette on top of chosen palette
...
Got to agree this is more ergonomic.
2023-01-20 13:57:39 -07:00
Behdad Esfahbod
bd73314616
[paint] Add API for custom palettes
2023-01-18 20:37:21 -07:00
Behdad Esfahbod
3ff91c449f
[paint] Optimize transform operations again
2022-12-31 14:49:41 -07:00
Behdad Esfahbod
6b47fcb17a
[paint] Add internal push_skew/pop_skew API
2022-12-31 11:40:12 -07:00
Behdad Esfahbod
46adf31b4c
[paint] Add internal push_rotate/pop_rotate API
2022-12-31 11:35:39 -07:00
Behdad Esfahbod
ce7835124a
[paint] Add internal push_scale/pop_scale API
2022-12-31 11:32:15 -07:00
Behdad Esfahbod
7363eb373a
[paint] Add internal push_translate/pop_translate
2022-12-31 11:24:42 -07:00
Behdad Esfahbod
df91677997
[paint] Call internal API internally
2022-12-31 11:12:02 -07:00
Behdad Esfahbod
99da0e6cc3
[paint] Avoid div-by-zero
2022-12-31 11:04:40 -07:00
Behdad Esfahbod
f70c5d6f0d
[paint] Continue returning bool from paint_image()
...
6ccbfabd4f (commitcomment-94127307)
2022-12-24 10:56:06 -07:00
Behdad Esfahbod
c5f903872f
[paint] Add bitmap width/height to paint_image callback
...
Such that we can add raw data as well.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
237955dffc
[paint] Add slant to image() callback
...
And slant images in hb-view.
2022-12-23 13:37:59 -07:00
Matthias Clasen
c221933977
[paint] Preserve foreground information
2022-12-23 13:37:59 -07:00
Matthias Clasen
6387004cad
[paint] Simplify api
...
Drop the hb_paint_context_t struct from the API, and
only pass the font where we need it.
2022-12-23 13:37:59 -07:00
Matthias Clasen
71bd5a0dfc
[paint] Resolve colors
...
We don't need to pass the index/alpha pairs to
client callbacks, and can just resolve the colors
internally.
Update test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
9be01b6bff
[paint] Pass hb_paint_context_t along
...
Replace the font argument with a hb_paint_context_t
that carries the font, the palette index and the
foreground color.
The hb_font_paint_glyph() api now takes the palette
index and the foreground color as extra arguments.
Update all callers and regenerate test results.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
8495395397
[paint] Fix slant
2022-12-23 13:37:59 -07:00
Matthias Clasen
97224f3b63
[paint] Pass font to all callbacks
...
This will lead to easier implementations.
At the same time, we change the push_clip_glyph
callback to use the font as-is, no unscaling needed.
Update all callers and expected test results.
2022-12-23 13:37:59 -07:00
Matthias Clasen
0a2f3673b9
[paint] Use tags for image formats
...
This fits better with the rest of the
HarfBuzz API.
2022-12-23 13:37:59 -07:00
Behdad Esfahbod
4b0285bae6
[colr] Use slant_xy
2022-12-23 13:37:59 -07:00
Matthias Clasen
a935e4b0c2
[paint] Add synthetic slant to root transform
2022-12-23 13:37:59 -07:00
Matthias Clasen
686e627bdf
[paint] Set up root transform in one place
...
Instead of spreading this in all the tables,
make hb_paint_funcs_t provide a push/pop_root_transform
that does all the setup.
2022-12-23 13:37:59 -07:00
Matthias Clasen
485ba9beb3
[paint] Spell out rectangle in the API
...
No need to abbreviate this.
2022-12-23 13:37:59 -07:00
Matthias Clasen
37f3f0fcc2
[paint] Change the image callback
...
Instead of passing the glyph ID, give
it the image blob, a mimetype, and
glyph extents (if available).
Update all callers.
2022-12-23 13:37:59 -07:00
Matthias Clasen
82e23f322a
paint: Add a paint-image callback
...
This will be used for image blobs like pngs and svgs.
FIXME: nail down and document sizing.
2022-12-23 13:37:59 -07:00
Matthias Clasen
0d890061d1
Rename 'solid' to 'color'
...
'solid' does not really describe well what
the function does, and there is no strong
reason to stick 1:1 to the terminology used
in the spec.
2022-12-23 13:37:59 -07:00
Matthias Clasen
64f1b55d01
api fixes: use floats consistently
2022-12-23 13:37:59 -07:00
Matthias Clasen
627c857f8b
rename pop_group_and_composite
2022-12-23 13:37:59 -07:00
Matthias Clasen
c9350838c7
assorted fixes and changes
2022-12-23 13:37:59 -07:00
Matthias Clasen
83d0a49f71
wip: hb-paint
2022-12-23 13:37:59 -07:00