From 23762305235f25ca89de34bed7948d925c98fba3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 7 Feb 2022 18:23:26 -0600 Subject: [PATCH] [draw] Flesh out docs a bit --- docs/harfbuzz-docs.xml | 1 + docs/harfbuzz-sections.txt | 31 ++++++++++++++++++ src/hb-draw.cc | 64 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/docs/harfbuzz-docs.xml b/docs/harfbuzz-docs.xml index d81b9fd05..7d3fb108f 100644 --- a/docs/harfbuzz-docs.xml +++ b/docs/harfbuzz-docs.xml @@ -56,6 +56,7 @@ + diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 8f21edf3c..acbcf1300 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -169,6 +169,7 @@ HB_FEATURE_GLOBAL_START HB_BEGIN_DECLS HB_END_DECLS hb_var_int_t +hb_var_num_t int16_t int32_t int64_t @@ -183,6 +184,33 @@ HB_DEPRECATED HB_DEPRECATED_FOR +
+hb-draw +hb_draw_funcs_t +hb_draw_funcs_create +hb_draw_funcs_destroy +hb_draw_funcs_reference +hb_draw_funcs_is_immutable +hb_draw_funcs_make_immutable +hb_draw_move_to_func_t +hb_draw_funcs_set_move_to_func +hb_draw_line_to_func_t +hb_draw_funcs_set_line_to_func +hb_draw_quadratic_to_func_t +hb_draw_funcs_set_quadratic_to_func +hb_draw_cubic_to_func_t +hb_draw_funcs_set_cubic_to_func +hb_draw_close_path_func_t +hb_draw_funcs_set_close_path_func +hb_draw_state_t +HB_DRAW_STATE_DEFAULT +hb_draw_move_to +hb_draw_line_to +hb_draw_quadratic_to +hb_draw_cubic_to +hb_draw_close_path +
+
hb-deprecated HB_BUFFER_FLAGS_DEFAULT @@ -281,6 +309,7 @@ hb_font_funcs_set_glyph_h_advances_func hb_font_funcs_set_glyph_h_kerning_func hb_font_funcs_set_glyph_h_origin_func hb_font_funcs_set_glyph_name_func +hb_font_funcs_set_glyph_shape_func hb_font_funcs_set_glyph_v_advance_func hb_font_funcs_set_glyph_v_advances_func hb_font_funcs_set_glyph_v_origin_func @@ -318,6 +347,8 @@ hb_font_get_glyph_name hb_font_get_glyph_name_func_t hb_font_get_glyph_origin_for_direction hb_font_get_glyph_origin_func_t +hb_font_get_glyph_shape +hb_font_get_glyph_shape_func_t hb_font_get_glyph_v_advance hb_font_get_glyph_v_advance_func_t hb_font_get_glyph_v_advances diff --git a/src/hb-draw.cc b/src/hb-draw.cc index cb4d752aa..627dfc80a 100644 --- a/src/hb-draw.cc +++ b/src/hb-draw.cc @@ -244,6 +244,18 @@ hb_draw_funcs_is_immutable (hb_draw_funcs_t *funcs) } +/** + * hb_draw_move_to: + * @funcs: draw functions + * @draw_data: associated draw data passed by the caller + * @st: current draw state + * @to_x: X component of target point + * @to_y: Y component of target point + * + * Perform a "move-to" draw operation. + * + * Since: REPLACEME + **/ void hb_draw_move_to (hb_draw_funcs_t *funcs, void *draw_data, hb_draw_state_t *st, @@ -253,6 +265,18 @@ hb_draw_move_to (hb_draw_funcs_t *funcs, void *draw_data, to_x, to_y); } +/** + * hb_draw_line_to: + * @funcs: draw functions + * @draw_data: associated draw data passed by the caller + * @st: current draw state + * @to_x: X component of target point + * @to_y: Y component of target point + * + * Perform a "line-to" draw operation. + * + * Since: REPLACEME + **/ void hb_draw_line_to (hb_draw_funcs_t *funcs, void *draw_data, hb_draw_state_t *st, @@ -262,6 +286,20 @@ hb_draw_line_to (hb_draw_funcs_t *funcs, void *draw_data, to_x, to_y); } +/** + * hb_draw_quadratic_to: + * @funcs: draw functions + * @draw_data: associated draw data passed by the caller + * @st: current draw state + * @control_x: X component of control point + * @control_y: Y component of control point + * @to_x: X component of target point + * @to_y: Y component of target point + * + * Perform a "quadratic-to" draw operation. + * + * Since: REPLACEME + **/ void hb_draw_quadratic_to (hb_draw_funcs_t *funcs, void *draw_data, hb_draw_state_t *st, @@ -273,6 +311,22 @@ hb_draw_quadratic_to (hb_draw_funcs_t *funcs, void *draw_data, to_x, to_y); } +/** + * hb_draw_cubic_to: + * @funcs: draw functions + * @draw_data: associated draw data passed by the caller + * @st: current draw state + * @control1_x: X component of first control point + * @control1_y: Y component of first control point + * @control2_x: X component of second control point + * @control2_y: Y component of second control point + * @to_x: X component of target point + * @to_y: Y component of target point + * + * Perform a "cubic-to" draw operation. + * + * Since: REPLACEME + **/ void hb_draw_cubic_to (hb_draw_funcs_t *funcs, void *draw_data, hb_draw_state_t *st, @@ -286,6 +340,16 @@ hb_draw_cubic_to (hb_draw_funcs_t *funcs, void *draw_data, to_x, to_y); } +/** + * hb_draw_close_path: + * @funcs: draw functions + * @draw_data: associated draw data passed by the caller + * @st: current draw state + * + * Perform a "close-path" draw operation. + * + * Since: REPLACEME + **/ void hb_draw_close_path (hb_draw_funcs_t *funcs, void *draw_data, hb_draw_state_t *st)