diff options
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/include/freetype/ftcolor.h')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/include/freetype/ftcolor.h | 211 |
1 files changed, 160 insertions, 51 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcolor.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcolor.h index 59e6f15e360..08dbac0ccc4 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcolor.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcolor.h @@ -740,22 +740,23 @@ FT_BEGIN_HEADER FT_COLR_COMPOSITE_SRC_ATOP = 9, FT_COLR_COMPOSITE_DEST_ATOP = 10, FT_COLR_COMPOSITE_XOR = 11, - FT_COLR_COMPOSITE_SCREEN = 12, - FT_COLR_COMPOSITE_OVERLAY = 13, - FT_COLR_COMPOSITE_DARKEN = 14, - FT_COLR_COMPOSITE_LIGHTEN = 15, - FT_COLR_COMPOSITE_COLOR_DODGE = 16, - FT_COLR_COMPOSITE_COLOR_BURN = 17, - FT_COLR_COMPOSITE_HARD_LIGHT = 18, - FT_COLR_COMPOSITE_SOFT_LIGHT = 19, - FT_COLR_COMPOSITE_DIFFERENCE = 20, - FT_COLR_COMPOSITE_EXCLUSION = 21, - FT_COLR_COMPOSITE_MULTIPLY = 22, - FT_COLR_COMPOSITE_HSL_HUE = 23, - FT_COLR_COMPOSITE_HSL_SATURATION = 24, - FT_COLR_COMPOSITE_HSL_COLOR = 25, - FT_COLR_COMPOSITE_HSL_LUMINOSITY = 26, - FT_COLR_COMPOSITE_MAX = 27 + FT_COLR_COMPOSITE_PLUS = 12, + FT_COLR_COMPOSITE_SCREEN = 13, + FT_COLR_COMPOSITE_OVERLAY = 14, + FT_COLR_COMPOSITE_DARKEN = 15, + FT_COLR_COMPOSITE_LIGHTEN = 16, + FT_COLR_COMPOSITE_COLOR_DODGE = 17, + FT_COLR_COMPOSITE_COLOR_BURN = 18, + FT_COLR_COMPOSITE_HARD_LIGHT = 19, + FT_COLR_COMPOSITE_SOFT_LIGHT = 20, + FT_COLR_COMPOSITE_DIFFERENCE = 21, + FT_COLR_COMPOSITE_EXCLUSION = 22, + FT_COLR_COMPOSITE_MULTIPLY = 23, + FT_COLR_COMPOSITE_HSL_HUE = 24, + FT_COLR_COMPOSITE_HSL_SATURATION = 25, + FT_COLR_COMPOSITE_HSL_COLOR = 26, + FT_COLR_COMPOSITE_HSL_LUMINOSITY = 27, + FT_COLR_COMPOSITE_MAX = 28 } FT_Composite_Mode; @@ -869,13 +870,16 @@ FT_BEGIN_HEADER * color stops along the gradient. * * p0 :: - * The starting point of the gradient definition (in font units). + * The starting point of the gradient definition in font units + * represented as a 16.16 fixed-point `FT_Vector`. * * p1 :: - * The end point of the gradient definition (in font units). + * The end point of the gradient definition in font units + * represented as a 16.16 fixed-point `FT_Vector`. * * p2 :: - * Optional point~p2 to rotate the gradient (in font units). + * Optional point~p2 to rotate the gradient in font units + * represented as a 16.16 fixed-point `FT_Vector`. * Otherwise equal to~p0. * * @since: @@ -913,19 +917,20 @@ FT_BEGIN_HEADER * color stops along the gradient. * * c0 :: - * The center of the starting point of the radial gradient (in font - * units). + * The center of the starting point of the radial gradient in font + * units represented as a 16.16 fixed-point `FT_Vector`. * * r0 :: - * The radius of the starting circle of the radial gradient (in font - * units). + * The radius of the starting circle of the radial gradient in font + * units represented as a 16.16 fixed-point value. * * c1 :: - * The center of the end point of the radial gradient (in font units). + * The center of the end point of the radial gradient in font units + * represented as a 16.16 fixed-point `FT_Vector`. * * r1 :: - * The radius of the end circle of the radial gradient (in font - * units). + * The radius of the end circle of the radial gradient in font + * units represented as a 16.16 fixed-point value. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -937,9 +942,9 @@ FT_BEGIN_HEADER FT_ColorLine colorline; FT_Vector c0; - FT_UShort r0; + FT_Pos r0; FT_Vector c1; - FT_UShort r1; + FT_Pos r1; } FT_PaintRadialGradient; @@ -962,17 +967,20 @@ FT_BEGIN_HEADER * color stops along the gradient. * * center :: - * The center of the sweep gradient (in font units). + * The center of the sweep gradient in font units represented as a + * vector of 16.16 fixed-point values. * * start_angle :: - * The start angle of the sweep gradient, in 16.16 fixed point format - * specifying degrees. Values are given counter-clockwise, starting - * from the (positive) y~axis. + * The start angle of the sweep gradient in 16.16 fixed-point + * format specifying degrees divided by 180.0 (as in the + * spec). Multiply by 180.0f to receive degrees value. Values are + * given counter-clockwise, starting from the (positive) y~axis. * * end_angle :: - * The end angle of the sweep gradient, in 16.16 fixed point format - * specifying degrees. Values are given counter-clockwise, starting - * from the (positive) y~axis. + * The end angle of the sweep gradient in 16.16 fixed-point + * format specifying degrees divided by 180.0 (as in the + * spec). Multiply by 180.0f to receive degrees value. Values are + * given counter-clockwise, starting from the (positive) y~axis. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -1058,7 +1066,8 @@ FT_BEGIN_HEADER * An opaque paint that is subject to being transformed. * * affine :: - * A 2x3 transformation matrix in @FT_Affine23 format. + * A 2x3 transformation matrix in @FT_Affine23 format containing + * 16.16 fixed-point values. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -1088,10 +1097,12 @@ FT_BEGIN_HEADER * rotated. * * dx :: - * Translation in x~direction (in font units). + * Translation in x~direction in font units represented as a + * 16.16 fixed-point value. * * dy :: - * Translation in y~direction (in font units). + * Translation in y~direction in font units represented as a + * 16.16 fixed-point value. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -1129,16 +1140,20 @@ FT_BEGIN_HEADER * scaled. * * scale_x :: - * Scale factor in x~direction. + * Scale factor in x~direction represented as a + * 16.16 fixed-point value. * * scale_y :: - * Scale factor in y~direction. + * Scale factor in y~direction represented as a + * 16.16 fixed-point value. * * center_x :: - * x~coordinate of center point to scale from. + * x~coordinate of center point to scale from represented as a + * 16.16 fixed-point value. * * center_y :: - * y~coordinate of center point to scale from. + * y~coordinate of center point to scale from represented as a + * 16.16 fixed-point value. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -1173,15 +1188,17 @@ FT_BEGIN_HEADER * rotated. * * angle :: - * The rotation angle that is to be applied. + * The rotation angle that is to be applied in degrees divided by + * 180.0 (as in the spec) represented as a 16.16 fixed-point + * value. Multiply by 180.0f to receive degrees value. * * center_x :: - * The x~coordinate of the pivot point of the rotation (in font - * units). + * The x~coordinate of the pivot point of the rotation in font + * units) represented as a 16.16 fixed-point value. * * center_y :: - * The y~coordinate of the pivot point of the rotation (in font - * units). + * The y~coordinate of the pivot point of the rotation in font + * units represented as a 16.16 fixed-point value. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -1217,16 +1234,22 @@ FT_BEGIN_HEADER * skewed. * * x_skew_angle :: - * The skewing angle in x~direction. + * The skewing angle in x~direction in degrees divided by 180.0 + * (as in the spec) represented as a 16.16 fixed-point + * value. Multiply by 180.0f to receive degrees. * * y_skew_angle :: - * The skewing angle in y~direction. + * The skewing angle in y~direction in degrees divided by 180.0 + * (as in the spec) represented as a 16.16 fixed-point + * value. Multiply by 180.0f to receive degrees. * * center_x :: - * The x~coordinate of the pivot point of the skew (in font units). + * The x~coordinate of the pivot point of the skew in font units + * represented as a 16.16 fixed-point value. * * center_y :: - * The y~coordinate of the pivot point of the skew (in font units). + * The y~coordinate of the pivot point of the skew in font units + * represented as a 16.16 fixed-point value. * * @since: * 2.11 -- **currently experimental only!** There might be changes @@ -1379,6 +1402,49 @@ FT_BEGIN_HEADER /************************************************************************** * + * @struct: + * FT_ClipBox + * + * @description: + * A structure representing a 'COLR' v1 'ClipBox' table. 'COLR' v1 + * glyphs may optionally define a clip box for aiding allocation or + * defining a maximum drawable region. Use @FT_Get_Color_Glyph_ClipBox + * to retrieve it. + * + * @fields: + * bottom_left :: + * The bottom left corner of the clip box as an @FT_Vector with + * fixed-point coordinates in 26.6 format. + * + * top_left :: + * The top left corner of the clip box as an @FT_Vector with + * fixed-point coordinates in 26.6 format. + * + * top_right :: + * The top right corner of the clip box as an @FT_Vector with + * fixed-point coordinates in 26.6 format. + * + * bottom_right :: + * The bottom right corner of the clip box as an @FT_Vector with + * fixed-point coordinates in 26.6 format. + * + * @since: + * 2.12 -- **currently experimental only!** There might be changes + * without retaining backward compatibility of both the API and ABI. + * + */ + typedef struct FT_ClipBox_ + { + FT_Vector bottom_left; + FT_Vector top_left; + FT_Vector top_right; + FT_Vector bottom_right; + + } FT_ClipBox; + + + /************************************************************************** + * * @function: * FT_Get_Color_Glyph_Paint * @@ -1472,6 +1538,49 @@ FT_BEGIN_HEADER /************************************************************************** * * @function: + * FT_Get_Color_Glyph_ClipBox + * + * @description: + * Search for a 'COLR' v1 clip box for the specified `base_glyph` and + * fill the `clip_box` parameter with the 'COLR' v1 'ClipBox' information + * if one is found. + * + * @input: + * face :: + * A handle to the parent face object. + * + * base_glyph :: + * The glyph index for which to retrieve the clip box. + * + * @output: + * clip_box :: + * The clip box for the requested `base_glyph` if one is found. The + * clip box is computed taking scale and transformations configured on + * the @FT_Face into account. @FT_ClipBox contains @FT_Vector values + * in 26.6 format. + * + * @return: + * Value~1 if a clip box is found. If no clip box is found or an error + * occured, value~0 is returned. + * + * @note: + * To retrieve the clip box in font units, reset scale to units-per-em + * and remove transforms configured using @FT_Set_Transform. + * + * @since: + * 2.12 -- **currently experimental only!** There might be changes + * without retaining backward compatibility of both the API and ABI. + * + */ + FT_EXPORT( FT_Bool ) + FT_Get_Color_Glyph_ClipBox( FT_Face face, + FT_UInt base_glyph, + FT_ClipBox* clip_box ); + + + /************************************************************************** + * + * @function: * FT_Get_Paint_Layers * * @description: |