Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
66189807
by Dominik Röttsches at 2021-07-29T06:01:34+00:00
2 changed files:
Changes:
... | ... | @@ -1219,10 +1219,12 @@ FT_BEGIN_HEADER |
1219 | 1219 |
* skewed.
|
1220 | 1220 |
*
|
1221 | 1221 |
* x_skew_angle ::
|
1222 |
- * The skewing angle in x~direction.
|
|
1222 |
+ * The skewing angle in x~direction in degrees divided by 180.0
|
|
1223 |
+ * (as in the spec). Multiply by 180.0f to receive degrees.
|
|
1223 | 1224 |
*
|
1224 | 1225 |
* y_skew_angle ::
|
1225 |
- * The skewing angle in y~direction.
|
|
1226 |
+ * The skewing angle in y~direction in degrees divided by 180.0
|
|
1227 |
+ * (as in the spec). Multiply by 180.0f to receive degrees.
|
|
1226 | 1228 |
*
|
1227 | 1229 |
* center_x ::
|
1228 | 1230 |
* The x~coordinate of the pivot point of the skew (in font units).
|
... | ... | @@ -649,16 +649,29 @@ |
649 | 649 |
return 1;
|
650 | 650 |
}
|
651 | 651 |
|
652 |
- else if ( apaint->format == FT_COLR_PAINTFORMAT_SKEW )
|
|
652 |
+ else if ( apaint->format == FT_COLR_PAINTFORMAT_SKEW ||
|
|
653 |
+ (FT_PaintFormat_Internal)apaint->format ==
|
|
654 |
+ FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER )
|
|
653 | 655 |
{
|
654 | 656 |
apaint->u.skew.paint.p = child_table_p;
|
655 | 657 |
apaint->u.skew.paint.insert_root_transform = 0;
|
656 | 658 |
|
657 |
- apaint->u.skew.x_skew_angle = FT_NEXT_LONG( p );
|
|
658 |
- apaint->u.skew.y_skew_angle = FT_NEXT_LONG( p );
|
|
659 |
+ apaint->u.skew.x_skew_angle = FT_NEXT_SHORT( p ) << 2;
|
|
660 |
+ apaint->u.skew.y_skew_angle = FT_NEXT_SHORT( p ) << 2;
|
|
661 |
+ |
|
662 |
+ if ( (FT_PaintFormat_Internal)apaint->format ==
|
|
663 |
+ FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER )
|
|
664 |
+ {
|
|
665 |
+ apaint->u.skew.center_x = FT_NEXT_SHORT( p ) << 16;
|
|
666 |
+ apaint->u.skew.center_y = FT_NEXT_SHORT( p ) << 16;
|
|
667 |
+ }
|
|
668 |
+ else
|
|
669 |
+ {
|
|
670 |
+ apaint->u.skew.center_x = 0;
|
|
671 |
+ apaint->u.skew.center_y = 0;
|
|
672 |
+ }
|
|
659 | 673 |
|
660 |
- apaint->u.skew.center_x = FT_NEXT_LONG( p );
|
|
661 |
- apaint->u.skew.center_y = FT_NEXT_LONG( p );
|
|
674 |
+ apaint->format = FT_COLR_PAINTFORMAT_SKEW;
|
|
662 | 675 |
|
663 | 676 |
return 1;
|
664 | 677 |
}
|