diff options
author | Dominik Röttsches <drott@chromium.org> | 2022-07-04 16:29:31 +0300 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2022-07-08 11:51:07 +0200 |
commit | 3414fef74f9dd1858aca521f93ebadca9ab36f96 (patch) | |
tree | 9ee95491cb76c57bc76403bfb4a135587aa458bd /include | |
parent | 7c151abb6903ddb9c9ed5a1c7b962819c1b2d36f (diff) | |
download | freetype2-3414fef74f9dd1858aca521f93ebadca9ab36f96.tar.gz |
[sfnt] Support variable 'COLR' v1 color lines.
* include/freetype/ftcolor.h (FT_ColorStopIterator): Add field
`read_variable` to indicate whether a variation index base should be read.
* src/sfnt/ttcolr.c: (FT_PaintFormat_Internal): New enumerations
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_LINEAR_GRADIENT`
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_RADIAL_GRADIENT`, and
`FT_COLR_PAINTFORMAT_INTERNAL_VAR_SWEEP_GRADIENT`.
(read_color_line): New parameter `read_variable`; update callers.
(read_paint): Handle new enumerations.
Diffstat (limited to 'include')
-rw-r--r-- | include/freetype/ftcolor.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h index 13285683f..17f1dd89c 100644 --- a/include/freetype/ftcolor.h +++ b/include/freetype/ftcolor.h @@ -521,9 +521,10 @@ FT_BEGIN_HEADER * * @description: * This iterator object is needed for @FT_Get_Colorline_Stops. It keeps - * state while iterating over the stops of an @FT_ColorLine, - * representing the `ColorLine` struct of the v1 extensions to 'COLR', - * see 'https://github.com/googlefonts/colr-gradients-spec'. + * state while iterating over the stops of an @FT_ColorLine, representing + * the `ColorLine` struct of the v1 extensions to 'COLR', see + * 'https://github.com/googlefonts/colr-gradients-spec'. Do not manually + * modify fields of this iterator. * * @fields: * num_color_stops :: @@ -537,6 +538,10 @@ FT_BEGIN_HEADER * An opaque pointer into 'COLR' table data. Set by @FT_Get_Paint. * Updated by @FT_Get_Colorline_Stops. * + * read_variable :: + * A boolean keeping track of whether variable color lines are to be + * read. Set by @FT_Get_Paint. + * * @since: * 2.11 -- **currently experimental only!** There might be changes * without retaining backward compatibility of both the API and ABI. @@ -549,6 +554,8 @@ FT_BEGIN_HEADER FT_Byte* p; + FT_Bool read_variable; + } FT_ColorStopIterator; |