Commit Graph

20 Commits

Author SHA1 Message Date
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
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 ddd2039265 [paint] Improve the docs 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 5ac218865a [paint] A doc fix 2022-12-23 13:37:59 -07:00
Behdad Esfahbod 5d1fc9ee9d [paint] Fix annotations 2022-12-23 13:37:59 -07:00
Behdad Esfahbod ee2204469e [paint] Add get_empty / [sg]et_user_data 2022-12-23 13:37:59 -07:00
Matthias Clasen 451414a27e [paint] Documentation fixes 2022-12-23 13:37:59 -07:00
Matthias Clasen 0c77f1d9ab [paint] Documentation tweaks 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
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 5afca91ff2 Add some docs 2022-12-23 13:37:59 -07:00
Matthias Clasen 44c68594f1 Some docs 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 efe13a191d fix introspection 2022-12-23 13:37:59 -07:00
Matthias Clasen 83d0a49f71 wip: hb-paint 2022-12-23 13:37:59 -07:00