[sfnt] 'COLR' v1 PaintSweepGradient spec update

* src/sfnt/ttcolr.c (read_paint): PaintSweepGradient follows other
spec changes and now has the angles specified as F2DOT14, reflect
that in the implementation.
* include/freetype/ftcolor.h (FT_PaintSweepGradient): Update
documentation.
This commit is contained in:
Dominik Röttsches 2021-07-26 18:28:56 +03:00 committed by Werner Lemberg
parent 5c0ac7a435
commit 30a82e1e5d
2 changed files with 10 additions and 8 deletions

View File

@ -965,14 +965,16 @@ FT_BEGIN_HEADER
* The center of the sweep gradient (in font units).
*
* 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

View File

@ -531,8 +531,8 @@
apaint->u.sweep_gradient.center.x = FT_NEXT_SHORT( p );
apaint->u.sweep_gradient.center.y = FT_NEXT_SHORT( p );
apaint->u.sweep_gradient.start_angle = FT_NEXT_LONG( p );
apaint->u.sweep_gradient.end_angle = FT_NEXT_LONG( p );
apaint->u.sweep_gradient.start_angle = FT_NEXT_SHORT( p ) << 2;
apaint->u.sweep_gradient.end_angle = FT_NEXT_SHORT( p ) << 2;
return 1;
}