mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 16:01:07 +01:00
Address PR #5933 review feedback
- Reset Since tags to XSince: REPLACEME for changed get_funcs signatures (gpu, raster, vector draw+paint). - Replace (transfer none) annotation syntax with prose in clip_path_start docs (hb-paint.cc and hb-paint.h). - Document that returned draw funcs/data are only valid until the matching clip_path_end call, and no other paint calls should be made in between. - Use switch instead of ternary for format in hb-vector-path.cc. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f7ebd549ed
commit
6636f042fc
8 files changed
+31
-17
No files matched your search
+1
-1
@@ -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)
|
||||
|
||||
+8
-4
@@ -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().
|
||||
*
|
||||
|
||||
+7
-6
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+11
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user