Dominik Röttsches pushed to branch master at FreeType / FreeType
Commits:
-
117df36b
by Dominik Röttsches at 2022-06-22T09:33:20+00:00
2 changed files:
Changes:
... | ... | @@ -592,7 +592,8 @@ FT_BEGIN_HEADER |
592 | 592 | *
|
593 | 593 | * @fields:
|
594 | 594 | * stop_offset ::
|
595 | - * The stop offset between 0 and 1 along the gradient.
|
|
595 | + * The stop offset along the gradient, expressed as a 16.16 fixed-point
|
|
596 | + * coordinate.
|
|
596 | 597 | *
|
597 | 598 | * color ::
|
598 | 599 | * The color information for this stop, see @FT_ColorIndex.
|
... | ... | @@ -604,7 +605,7 @@ FT_BEGIN_HEADER |
604 | 605 | */
|
605 | 606 | typedef struct FT_ColorStop_
|
606 | 607 | {
|
607 | - FT_F2Dot14 stop_offset;
|
|
608 | + FT_Fixed stop_offset;
|
|
608 | 609 | FT_ColorIndex color;
|
609 | 610 | |
610 | 611 | } FT_ColorStop;
|
... | ... | @@ -1054,7 +1054,7 @@ |
1054 | 1054 | /* Iterator points at first `ColorStop` of `ColorLine`. */
|
1055 | 1055 | p = iterator->p;
|
1056 | 1056 | |
1057 | - color_stop->stop_offset = FT_NEXT_SHORT( p );
|
|
1057 | + color_stop->stop_offset = (FT_Fixed)FT_NEXT_SHORT( p ) << 2;
|
|
1058 | 1058 | |
1059 | 1059 | color_stop->color.palette_index = FT_NEXT_USHORT( p );
|
1060 | 1060 |