PaintImageFunc


Description:

[ CCode ( cname = "hb_paint_image_func_t" , instance_pos = 8.9 ) ]
[ Version ( since = "7.0.0" ) ]
public delegate Bool PaintImageFunc (PaintFuncs funcs, void* paint_data, Blob image, uint width, uint height, Tag format, float slant, GlyphExtents? extents)

A virtual method for the PaintFuncs to paint a glyph image.

This method is called for glyphs with image blobs in the CBDT, sbix or SVG tables. The format identifies the kind of data that is contained in image. Possible values include HB_PAINT_IMAGE_FORMAT_PNG, HB_PAINT_IMAGE_FORMAT_SVG and HB_PAINT_IMAGE_FORMAT_BGRA.

The image dimensions and glyph extents are provided if available, and should be used to size and position the image.

Parameters:

funcs

paint functions object

paint_data

The data accompanying the paint functions in paint_glyph

image

the image data

width

width of the raster image in pixels, or 0

height

height of the raster image in pixels, or 0

format

the image format as a tag

slant

the synthetic slant ratio to be applied to the image during rendering

extents

glyph extents for desired rendering

user_data

User data pointer passed to set_image_func

Returns:

Whether the operation was successful.


Namespace: HarfBuzz