freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [sfnt] Upgrade stop_offset to FT_Fixed


From: @drott
Subject: [Git][freetype/freetype][master] [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14
Date: Wed, 22 Jun 2022 09:33:24 +0000

Dominik Röttsches pushed to branch master at FreeType / FreeType

Commits:

  • 117df36b
    by Dominik Röttsches at 2022-06-22T09:33:20+00:00
    [sfnt] Upgrade stop_offset to FT_Fixed from FT_F2Dot14
    

2 changed files:

Changes:

  • include/freetype/ftcolor.h
    ... ... @@ -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;
    

  • src/sfnt/ttcolr.c
    ... ... @@ -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
     
    


  • reply via email to

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