freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [sfnt] s/PaintTransformed/PaintTransfor


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/.
Date: Tue, 22 Jun 2021 18:51:23 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

3 changed files:

Changes:

  • ChangeLog
    1
    +2021-07-22  Dominik Röttsches  <drott@chromium.org>
    
    2
    +
    
    3
    +	[sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/.
    
    4
    +
    
    5
    +	* include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat,
    
    6
    +	FT_COLR_Paint): Do it to make it harmonize with other names such as
    
    7
    +	'PaintTranslate'.
    
    8
    +
    
    9
    +	* src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto.
    
    10
    +
    
    1 11
     2021-07-22  Dominik Röttsches  <drott@chromium.org>
    
    2 12
     
    
    3 13
     	Move 'COLR' API to `ftcolor.h`.
    

  • include/freetype/ftcolor.h
    ... ... @@ -496,7 +496,7 @@ FT_BEGIN_HEADER
    496 496
         FT_COLR_PAINTFORMAT_SWEEP_GRADIENT  = 8,
    
    497 497
         FT_COLR_PAINTFORMAT_GLYPH           = 10,
    
    498 498
         FT_COLR_PAINTFORMAT_COLR_GLYPH      = 11,
    
    499
    -    FT_COLR_PAINTFORMAT_TRANSFORMED     = 12,
    
    499
    +    FT_COLR_PAINTFORMAT_TRANSFORM       = 12,
    
    500 500
         FT_COLR_PAINTFORMAT_TRANSLATE       = 14,
    
    501 501
         FT_COLR_PAINTFORMAT_ROTATE          = 16,
    
    502 502
         FT_COLR_PAINTFORMAT_SKEW            = 18,
    
    ... ... @@ -762,7 +762,7 @@ FT_BEGIN_HEADER
    762 762
        *   A structure representing an offset to a `Paint` value stored in any
    
    763 763
        *   of the paint tables of a 'COLR' v1 font.  Compare Offset<24> there.
    
    764 764
        *   When 'COLR' v1 paint tables represented by FreeType objects such as
    
    765
    -   *   @FT_PaintColrLayers, @FT_PaintComposite, or @FT_PaintTransformed
    
    765
    +   *   @FT_PaintColrLayers, @FT_PaintComposite, or @FT_PaintTransform
    
    766 766
        *   reference downstream nested paint tables, we do not immediately
    
    767 767
        *   retrieve them but encapsulate their location in this type.  Use
    
    768 768
        *   @FT_Get_Paint to retrieve the actual @FT_COLR_Paint object that
    
    ... ... @@ -1041,10 +1041,10 @@ FT_BEGIN_HEADER
    1041 1041
       /**************************************************************************
    
    1042 1042
        *
    
    1043 1043
        * @struct:
    
    1044
    -   *   FT_PaintTransformed
    
    1044
    +   *   FT_PaintTransform
    
    1045 1045
        *
    
    1046 1046
        * @description:
    
    1047
    -   *   A structure representing a 'COLR' v1 `PaintTransformed` paint table.
    
    1047
    +   *   A structure representing a 'COLR' v1 `PaintTransform` paint table.
    
    1048 1048
        *
    
    1049 1049
        * @fields:
    
    1050 1050
        *   paint ::
    
    ... ... @@ -1058,12 +1058,12 @@ FT_BEGIN_HEADER
    1058 1058
        *   without retaining backward-compatibility of both the API and ABI.
    
    1059 1059
        *
    
    1060 1060
        */
    
    1061
    -  typedef struct  FT_PaintTransformed_
    
    1061
    +  typedef struct  FT_PaintTransform_
    
    1062 1062
       {
    
    1063 1063
         FT_OpaquePaint  paint;
    
    1064 1064
         FT_Affine23     affine;
    
    1065 1065
     
    
    1066
    -  } FT_PaintTransformed;
    
    1066
    +  } FT_PaintTransform;
    
    1067 1067
     
    
    1068 1068
     
    
    1069 1069
       /**************************************************************************
    
    ... ... @@ -1251,7 +1251,7 @@ FT_BEGIN_HEADER
    1251 1251
        *       * @FT_PaintLinearGradient
    
    1252 1252
        *       * @FT_PaintRadialGradient
    
    1253 1253
        *       * @FT_PaintSweepGradient
    
    1254
    -   *       * @FT_PaintTransformed
    
    1254
    +   *       * @FT_PaintTransform
    
    1255 1255
        *       * @FT_PaintTranslate
    
    1256 1256
        *       * @FT_PaintRotate
    
    1257 1257
        *       * @FT_PaintSkew
    
    ... ... @@ -1275,7 +1275,7 @@ FT_BEGIN_HEADER
    1275 1275
           FT_PaintLinearGradient  linear_gradient;
    
    1276 1276
           FT_PaintRadialGradient  radial_gradient;
    
    1277 1277
           FT_PaintSweepGradient   sweep_gradient;
    
    1278
    -      FT_PaintTransformed     transformed;
    
    1278
    +      FT_PaintTransform       transform;
    
    1279 1279
           FT_PaintTranslate       translate;
    
    1280 1280
           FT_PaintRotate          rotate;
    
    1281 1281
           FT_PaintSkew            skew;
    
    ... ... @@ -1367,7 +1367,7 @@ FT_BEGIN_HEADER
    1367 1367
        *
    
    1368 1368
        *   root_transform ::
    
    1369 1369
        *     Specifies whether an initially computed root is returned by the
    
    1370
    -   *     @FT_PaintTransformed operation to account for the activated size
    
    1370
    +   *     @FT_PaintTransform operation to account for the activated size
    
    1371 1371
        *     (see @FT_Activate_Size) and the configured transform and translate
    
    1372 1372
        *     (see @FT_Set_Transform).
    
    1373 1373
        *
    

  • src/sfnt/ttcolr.c
    ... ... @@ -507,17 +507,17 @@
    507 507
           return 1;
    
    508 508
         }
    
    509 509
     
    
    510
    -    else if ( apaint->format == FT_COLR_PAINTFORMAT_TRANSFORMED )
    
    510
    +    else if ( apaint->format == FT_COLR_PAINTFORMAT_TRANSFORM )
    
    511 511
         {
    
    512
    -      apaint->u.transformed.paint.p                     = child_table_p;
    
    513
    -      apaint->u.transformed.paint.insert_root_transform = 0;
    
    512
    +      apaint->u.transform.paint.p                     = child_table_p;
    
    513
    +      apaint->u.transform.paint.insert_root_transform = 0;
    
    514 514
     
    
    515
    -      apaint->u.transformed.affine.xx = FT_NEXT_LONG( p );
    
    516
    -      apaint->u.transformed.affine.yx = FT_NEXT_LONG( p );
    
    517
    -      apaint->u.transformed.affine.xy = FT_NEXT_LONG( p );
    
    518
    -      apaint->u.transformed.affine.yy = FT_NEXT_LONG( p );
    
    519
    -      apaint->u.transformed.affine.dx = FT_NEXT_LONG( p );
    
    520
    -      apaint->u.transformed.affine.dy = FT_NEXT_LONG( p );
    
    515
    +      apaint->u.transform.affine.xx = FT_NEXT_LONG( p );
    
    516
    +      apaint->u.transform.affine.yx = FT_NEXT_LONG( p );
    
    517
    +      apaint->u.transform.affine.xy = FT_NEXT_LONG( p );
    
    518
    +      apaint->u.transform.affine.yy = FT_NEXT_LONG( p );
    
    519
    +      apaint->u.transform.affine.dx = FT_NEXT_LONG( p );
    
    520
    +      apaint->u.transform.affine.dy = FT_NEXT_LONG( p );
    
    521 521
     
    
    522 522
           return 1;
    
    523 523
         }
    
    ... ... @@ -809,11 +809,11 @@
    809 809
            * drawing operations for subsequenct paints.  Prepare this initial
    
    810 810
            * transform here.
    
    811 811
            */
    
    812
    -      paint->format = FT_COLR_PAINTFORMAT_TRANSFORMED;
    
    812
    +      paint->format = FT_COLR_PAINTFORMAT_TRANSFORM;
    
    813 813
     
    
    814 814
           next_paint.p                     = opaque_paint.p;
    
    815 815
           next_paint.insert_root_transform = 0;
    
    816
    -      paint->u.transformed.paint       = next_paint;
    
    816
    +      paint->u.transform.paint         = next_paint;
    
    817 817
     
    
    818 818
           /* `x_scale` and `y_scale` are in 26.6 format, representing the scale
    
    819 819
            * factor to get from font units to requested size.  However, expected
    
    ... ... @@ -828,28 +828,28 @@
    828 828
             FT_Matrix_Multiply( &face->root.internal->transform_matrix,
    
    829 829
                                 &ft_root_scale );
    
    830 830
     
    
    831
    -      paint->u.transformed.affine.xx = ft_root_scale.xx;
    
    832
    -      paint->u.transformed.affine.xy = ft_root_scale.xy;
    
    833
    -      paint->u.transformed.affine.yx = ft_root_scale.yx;
    
    834
    -      paint->u.transformed.affine.yy = ft_root_scale.yy;
    
    831
    +      paint->u.transform.affine.xx = ft_root_scale.xx;
    
    832
    +      paint->u.transform.affine.xy = ft_root_scale.xy;
    
    833
    +      paint->u.transform.affine.yx = ft_root_scale.yx;
    
    834
    +      paint->u.transform.affine.yy = ft_root_scale.yy;
    
    835 835
     
    
    836 836
           /* The translation is specified in 26.6 format and, according to the
    
    837 837
            * documentation of `FT_Set_Translate`, is performed on the character
    
    838 838
            * size given in the last call to `FT_Set_Char_Size`.  The
    
    839
    -       * 'PaintTransformed' paint table's `FT_Affine23` format expects
    
    839
    +       * 'PaintTransform' paint table's `FT_Affine23` format expects
    
    840 840
            * values in 16.16 format, thus we need to shift by 10 bits.
    
    841 841
            */
    
    842 842
           if ( face->root.internal->transform_flags & 2 )
    
    843 843
           {
    
    844
    -        paint->u.transformed.affine.dx =
    
    844
    +        paint->u.transform.affine.dx =
    
    845 845
               face->root.internal->transform_delta.x << 10;
    
    846
    -        paint->u.transformed.affine.dy =
    
    846
    +        paint->u.transform.affine.dy =
    
    847 847
               face->root.internal->transform_delta.y << 10;
    
    848 848
           }
    
    849 849
           else
    
    850 850
           {
    
    851
    -        paint->u.transformed.affine.dx = 0;
    
    852
    -        paint->u.transformed.affine.dy = 0;
    
    851
    +        paint->u.transform.affine.dx = 0;
    
    852
    +        paint->u.transform.affine.dy = 0;
    
    853 853
           }
    
    854 854
     
    
    855 855
           return 1;
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]