diff --git a/src/hb-vector-draw.cc b/src/hb-vector-draw.cc index 80206818e..bbef3b1f5 100644 --- a/src/hb-vector-draw.cc +++ b/src/hb-vector-draw.cc @@ -675,6 +675,23 @@ hb_vector_draw_set_flat (hb_vector_draw_t *draw, draw->flat = !!flat; } +/** + * hb_vector_draw_get_flat: + * @draw: a draw context. + * + * Returns the flatten flag previously set on @draw, or `false` if + * none was set. + * + * Return value: the flatten flag. + * + * XSince: REPLACEME + */ +hb_bool_t +hb_vector_draw_get_flat (const hb_vector_draw_t *draw) +{ + return draw->flat; +} + /** * hb_vector_draw_set_precision: * @draw: a draw context. @@ -691,6 +708,23 @@ hb_vector_draw_set_precision (hb_vector_draw_t *draw, draw->precision = hb_min (precision, 12u); } +/** + * hb_vector_draw_get_precision: + * @draw: a draw context. + * + * Returns the numeric output precision previously set on @draw, + * or the default if none was set. + * + * Return value: the precision. + * + * XSince: REPLACEME + */ +unsigned +hb_vector_draw_get_precision (const hb_vector_draw_t *draw) +{ + return draw->precision; +} + static hb_blob_t * hb_vector_draw_render_pdf (hb_vector_draw_t *draw) { diff --git a/src/hb-vector-paint.cc b/src/hb-vector-paint.cc index 183b1ff69..cc7c559eb 100644 --- a/src/hb-vector-paint.cc +++ b/src/hb-vector-paint.cc @@ -1127,6 +1127,23 @@ hb_vector_paint_set_foreground (hb_vector_paint_t *paint, paint->foreground = foreground; } +/** + * hb_vector_paint_get_foreground: + * @paint: a paint context. + * + * Returns the foreground color previously set on @paint, or the + * default opaque black if none was set. + * + * Return value: the foreground color. + * + * XSince: REPLACEME + */ +hb_color_t +hb_vector_paint_get_foreground (const hb_vector_paint_t *paint) +{ + return paint->foreground; +} + /** * hb_vector_paint_set_palette: * @paint: a paint context. @@ -1143,6 +1160,23 @@ hb_vector_paint_set_palette (hb_vector_paint_t *paint, paint->palette = palette; } +/** + * hb_vector_paint_get_palette: + * @paint: a paint context. + * + * Returns the palette index previously set on @paint, or 0 if none + * was set. + * + * Return value: the palette index. + * + * XSince: REPLACEME + */ +int +hb_vector_paint_get_palette (const hb_vector_paint_t *paint) +{ + return paint->palette; +} + /** * hb_vector_paint_set_custom_palette_color: * @paint: a paint context. @@ -1401,6 +1435,23 @@ hb_vector_paint_set_flat (hb_vector_paint_t *paint, paint->flat = !!flat; } +/** + * hb_vector_paint_get_flat: + * @paint: a paint context. + * + * Returns the flatten flag previously set on @paint, or `false` if + * none was set. + * + * Return value: the flatten flag. + * + * XSince: REPLACEME + */ +hb_bool_t +hb_vector_paint_get_flat (const hb_vector_paint_t *paint) +{ + return paint->flat; +} + /** * hb_vector_paint_set_precision: * @paint: a paint context. @@ -1417,6 +1468,23 @@ hb_vector_paint_set_precision (hb_vector_paint_t *paint, paint->precision = hb_min (precision, 12u); } +/** + * hb_vector_paint_get_precision: + * @paint: a paint context. + * + * Returns the numeric output precision previously set on @paint, + * or the default if none was set. + * + * Return value: the precision. + * + * XSince: REPLACEME + */ +unsigned +hb_vector_paint_get_precision (const hb_vector_paint_t *paint) +{ + return paint->precision; +} + /** * hb_vector_paint_clear: * @paint: a paint context. diff --git a/src/hb-vector.h b/src/hb-vector.h index aba746d77..49e00c585 100644 --- a/src/hb-vector.h +++ b/src/hb-vector.h @@ -166,10 +166,16 @@ HB_EXTERN void hb_vector_draw_set_flat (hb_vector_draw_t *draw, hb_bool_t flat); +HB_EXTERN hb_bool_t +hb_vector_draw_get_flat (const hb_vector_draw_t *draw); + HB_EXTERN void hb_vector_draw_set_precision (hb_vector_draw_t *draw, unsigned precision); +HB_EXTERN unsigned +hb_vector_draw_get_precision (const hb_vector_draw_t *draw); + HB_EXTERN hb_blob_t * hb_vector_draw_render (hb_vector_draw_t *draw); @@ -244,10 +250,16 @@ HB_EXTERN void hb_vector_paint_set_foreground (hb_vector_paint_t *paint, hb_color_t foreground); +HB_EXTERN hb_color_t +hb_vector_paint_get_foreground (const hb_vector_paint_t *paint); + HB_EXTERN void hb_vector_paint_set_palette (hb_vector_paint_t *paint, int palette); +HB_EXTERN int +hb_vector_paint_get_palette (const hb_vector_paint_t *paint); + HB_EXTERN void hb_vector_paint_set_custom_palette_color (hb_vector_paint_t *paint, unsigned color_index, @@ -271,10 +283,16 @@ HB_EXTERN void hb_vector_paint_set_flat (hb_vector_paint_t *paint, hb_bool_t flat); +HB_EXTERN hb_bool_t +hb_vector_paint_get_flat (const hb_vector_paint_t *paint); + HB_EXTERN void hb_vector_paint_set_precision (hb_vector_paint_t *paint, unsigned precision); +HB_EXTERN unsigned +hb_vector_paint_get_precision (const hb_vector_paint_t *paint); + HB_EXTERN hb_blob_t * hb_vector_paint_render (hb_vector_paint_t *paint);