freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [sfnt] 'COLR' v1 PaintSweepGradient spe


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [sfnt] 'COLR' v1 PaintSweepGradient spec update
Date: Thu, 29 Jul 2021 06:13:59 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • include/freetype/ftcolor.h
    ... ... @@ -965,14 +965,16 @@ FT_BEGIN_HEADER
    965 965
        *     The center of the sweep gradient (in font units).
    
    966 966
        *
    
    967 967
        *   start_angle ::
    
    968
    -   *     The start angle of the sweep gradient, in 16.16 fixed point format
    
    969
    -   *     specifying degrees.  Values are given counter-clockwise, starting
    
    970
    -   *     from the (positive) y~axis.
    
    968
    +   *     The start angle of the sweep gradient, in 16.16 fixed point
    
    969
    +   *     format specifying degrees divided by 180.0 (as in the
    
    970
    +   *     spec).  Multiply by 180.0f to receive degrees value.  Values are
    
    971
    +   *     given counter-clockwise, starting from the (positive) y~axis.
    
    971 972
        *
    
    972 973
        *   end_angle ::
    
    973
    -   *     The end angle of the sweep gradient, in 16.16 fixed point format
    
    974
    -   *     specifying degrees.  Values are given counter-clockwise, starting
    
    975
    -   *     from the (positive) y~axis.
    
    974
    +   *     The end angle of the sweep gradient, in 16.16 fixed point
    
    975
    +   *     format specifying degrees divided by 180.0 (as in the
    
    976
    +   *     spec).  Multiply by 180.0f to receive degrees value.  Values are
    
    977
    +   *     given counter-clockwise, starting from the (positive) y~axis.
    
    976 978
        *
    
    977 979
        * @since:
    
    978 980
        *   2.11 -- **currently experimental only!**  There might be changes
    

  • src/sfnt/ttcolr.c
    ... ... @@ -531,8 +531,8 @@
    531 531
           apaint->u.sweep_gradient.center.x = FT_NEXT_SHORT( p );
    
    532 532
           apaint->u.sweep_gradient.center.y = FT_NEXT_SHORT( p );
    
    533 533
     
    
    534
    -      apaint->u.sweep_gradient.start_angle = FT_NEXT_LONG( p );
    
    535
    -      apaint->u.sweep_gradient.end_angle = FT_NEXT_LONG( p );
    
    534
    +      apaint->u.sweep_gradient.start_angle = FT_NEXT_SHORT( p ) << 2;
    
    535
    +      apaint->u.sweep_gradient.end_angle = FT_NEXT_SHORT( p ) << 2;
    
    536 536
     
    
    537 537
           return 1;
    
    538 538
         }
    


  • reply via email to

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