diff --git a/src/hb-gpu-draw.cc b/src/hb-gpu-draw.cc index 9ab22571e..63c30ddfd 100644 --- a/src/hb-gpu-draw.cc +++ b/src/hb-gpu-draw.cc @@ -917,7 +917,7 @@ hb_gpu_draw_get_user_data (const hb_gpu_draw_t *draw, * Return value: (transfer none): * The GPU draw functions * - * Since: 14.0.0 + * XSince: REPLACEME **/ hb_draw_funcs_t * hb_gpu_draw_get_funcs (const hb_gpu_draw_t *draw HB_UNUSED) diff --git a/src/hb-paint.cc b/src/hb-paint.cc index b5e7c829a..f5ed66c6e 100644 --- a/src/hb-paint.cc +++ b/src/hb-paint.cc @@ -597,10 +597,14 @@ hb_paint_push_clip_rectangle (hb_paint_funcs_t *funcs, void *paint_data, * @draw_data: (out) (nullable): location to receive the draw data * the caller should pass alongside the returned draw funcs. * - * Begin clipping to an arbitrary path. Returns a - * #hb_draw_funcs_t (transfer none) that the caller uses to - * emit the clip outline via hb_draw_*() calls, using the - * returned @draw_data as the draw data. Finish the path + * Begin clipping to an arbitrary path. Returns an + * #hb_draw_funcs_t owned by the backend (the caller must not + * free it) that the caller uses to emit the clip outline via + * hb_draw_*() calls, using the returned @draw_data as the + * draw data. The returned draw funcs and draw data are only + * valid until the matching hb_paint_push_clip_path_end() call; + * no other paint calls should be made between start and end + * except hb_draw_*() on the returned funcs. Finish the path * with hb_paint_push_clip_path_end(); pop the clip later * with hb_paint_pop_clip(). * diff --git a/src/hb-paint.h b/src/hb-paint.h index e61e6384d..b6a94d994 100644 --- a/src/hb-paint.h +++ b/src/hb-paint.h @@ -222,12 +222,13 @@ typedef void (*hb_paint_push_clip_rectangle_func_t) (hb_paint_funcs_t *funcs, * @user_data: User data pointer passed to hb_paint_funcs_set_push_clip_path_start_func() * * A virtual method for the #hb_paint_funcs_t to begin clipping - * to an arbitrary path. The backend returns a - * #hb_draw_funcs_t (transfer none) that the caller feeds the - * clip outline to via hb_draw_*() calls, plus a - * @draw_data value (transfer none) to pass alongside those - * calls. The path is closed by a matching call to the - * #hb_paint_push_clip_path_end_func_t vfunc; the clip remains + * to an arbitrary path. The backend returns an + * #hb_draw_funcs_t it owns (the caller must not free it) + * that the caller feeds the clip outline to via hb_draw_*() + * calls, plus a @draw_data value to pass alongside those + * calls. Both are only valid until the matching + * #hb_paint_push_clip_path_end_func_t call; no other paint + * calls should be made in between. The clip remains * in effect until a later #hb_paint_pop_clip_func_t call. * * Return value: (transfer none): draw funcs that accumulate diff --git a/src/hb-raster-draw.cc b/src/hb-raster-draw.cc index de704a55b..1150c99fe 100644 --- a/src/hb-raster-draw.cc +++ b/src/hb-raster-draw.cc @@ -944,7 +944,7 @@ free_static_raster_draw_funcs () * Return value: (transfer none): * The rasterizer draw functions * - * Since: 13.0.0 + * XSince: REPLACEME **/ hb_draw_funcs_t * hb_raster_draw_get_funcs (const hb_raster_draw_t *draw HB_UNUSED) diff --git a/src/hb-raster-paint.cc b/src/hb-raster-paint.cc index b9aa392ed..bfe6517b6 100644 --- a/src/hb-raster-paint.cc +++ b/src/hb-raster-paint.cc @@ -2174,7 +2174,7 @@ hb_raster_paint_set_custom_palette_color (hb_raster_paint_t *paint, * Return value: (transfer none): * The rasterizer paint functions * - * Since: 13.0.0 + * XSince: REPLACEME **/ hb_paint_funcs_t * hb_raster_paint_get_funcs (const hb_raster_paint_t *paint HB_UNUSED) diff --git a/src/hb-vector-draw.cc b/src/hb-vector-draw.cc index f50047a01..36bd819a2 100644 --- a/src/hb-vector-draw.cc +++ b/src/hb-vector-draw.cc @@ -535,7 +535,7 @@ hb_vector_draw_get_format (const hb_vector_draw_t *draw) * * Return value: (transfer none): immutable #hb_draw_funcs_t. * - * Since: 13.0.0 + * XSince: REPLACEME */ hb_draw_funcs_t * hb_vector_draw_get_funcs (const hb_vector_draw_t *draw HB_UNUSED) diff --git a/src/hb-vector-paint.cc b/src/hb-vector-paint.cc index 71fa8b2f3..3435169f4 100644 --- a/src/hb-vector-paint.cc +++ b/src/hb-vector-paint.cc @@ -1381,7 +1381,7 @@ hb_vector_paint_get_format (const hb_vector_paint_t *paint) * * Return value: (transfer none): immutable #hb_paint_funcs_t. * - * Since: 13.0.0 + * XSince: REPLACEME */ hb_paint_funcs_t * hb_vector_paint_get_funcs (const hb_vector_paint_t *paint) diff --git a/src/hb-vector-path.cc b/src/hb-vector-path.cc index b3536314f..a6447417a 100644 --- a/src/hb-vector-path.cc +++ b/src/hb-vector-path.cc @@ -36,8 +36,17 @@ static inline void hb_vector_path_append_xy (hb_vector_path_sink_t *s, float x, float y) { hb_buf_append_num (s->path, x, s->precision); - hb_buf_append_c (s->path, - s->format == HB_VECTOR_FORMAT_PDF ? ' ' : ','); + switch (s->format) + { + case HB_VECTOR_FORMAT_PDF: + hb_buf_append_c (s->path, ' '); + break; + case HB_VECTOR_FORMAT_SVG: + hb_buf_append_c (s->path, ','); + break; + case HB_VECTOR_FORMAT_INVALID: default: + break; + } hb_buf_append_num (s->path, y, s->precision); }