[paint] Documentation fixes

This commit is contained in:
Matthias Clasen 2022-12-17 18:14:31 -05:00 committed by Behdad Esfahbod
parent e3153654cb
commit 451414a27e
2 changed files with 37 additions and 9 deletions

View File

@ -26,23 +26,49 @@ void PaintColrGlyph::paint_glyph (hb_paint_context_t *c) const
}
/**
* hb_color_line_get_color_stops:
* @color_line: a #hb_color_line_t object
* @start: the index of the first color stop to return
* @count: (inout) (optional): Input = the maximum number of feature tags to return;
* Output = the actual number of feature tags returned (may be zero)
* @color_stops: (out) (array length=count) (optional): Array of #hb_color_stop_t to populate
*
* Fetches a list of color stops from the given color line object.
*
* Note that due to variations being applied, the returned color stops
* may be out of order. It is the callers responsibility to ensure that
* color stops are sorted by their offset before they are used.
*
* Return value: the total number of color stops in @cl
*
* Since: REPLACEME
*/
unsigned int
hb_color_line_get_color_stops (hb_color_line_t *cl,
hb_color_line_get_color_stops (hb_color_line_t *color_line,
unsigned int start,
unsigned int *count,
hb_color_stop_t *color_stops)
{
if (cl->is_variable)
return reinterpret_cast<const OT::ColorLine<OT::Variable> *>(cl->base)->get_color_stops (start, count, color_stops, cl->c->instancer);
if (color_line->is_variable)
return reinterpret_cast<const OT::ColorLine<OT::Variable> *>(color_line->base)->get_color_stops (start, count, color_stops, color_line->c->instancer);
else
return reinterpret_cast<const OT::ColorLine<OT::NoVariable> *>(cl->base)->get_color_stops (start, count, color_stops, cl->c->instancer);
return reinterpret_cast<const OT::ColorLine<OT::NoVariable> *>(color_line->base)->get_color_stops (start, count, color_stops, color_line->c->instancer);
}
/**
* hb_color_line_get_extend:
* @color_line: a #hb_color_line_t object
*
* Fetches the extend mode of the color line object.
*
* Since: REPLACEME
*/
hb_paint_extend_t
hb_color_line_get_extend (hb_color_line_t *cl)
hb_color_line_get_extend (hb_color_line_t *color_line)
{
if (cl->is_variable)
return reinterpret_cast<const OT::ColorLine<OT::Variable> *>(cl->base)->get_extend ();
if (color_line->is_variable)
return reinterpret_cast<const OT::ColorLine<OT::Variable> *>(color_line->base)->get_extend ();
else
return reinterpret_cast<const OT::ColorLine<OT::NoVariable> *>(cl->base)->get_extend ();
return reinterpret_cast<const OT::ColorLine<OT::NoVariable> *>(color_line->base)->get_extend ();
}

View File

@ -420,7 +420,9 @@ hb_paint_color (hb_paint_funcs_t *funcs, void *paint_data,
* hb_paint_image:
* @funcs: paint functions
* @paint_data: associated data passed by the caller
* @glyph: the glyph ID
* @image: image data
* @format: tag describing the image data format
* @extents: (nullable): the extents of the glyph
*
* Perform a "image" paint operation.
*