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 PaintTranslate and Pai


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [sfnt] 'COLR' v1 PaintTranslate and PaintScale precision
Date: Thu, 29 Jul 2021 05:57:50 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/sfnt/ttcolr.c
    ... ... @@ -566,8 +566,8 @@
    566 566
           apaint->u.translate.paint.p                     = child_table_p;
    
    567 567
           apaint->u.translate.paint.insert_root_transform = 0;
    
    568 568
     
    
    569
    -      apaint->u.translate.dx = FT_NEXT_LONG( p );
    
    570
    -      apaint->u.translate.dy = FT_NEXT_LONG( p );
    
    569
    +      apaint->u.translate.dx = FT_NEXT_SHORT( p ) << 16;
    
    570
    +      apaint->u.translate.dy = FT_NEXT_SHORT( p ) << 16;
    
    571 571
     
    
    572 572
           return 1;
    
    573 573
         }
    
    ... ... @@ -585,14 +585,14 @@
    585 585
           apaint->u.scale.paint.insert_root_transform = 0;
    
    586 586
     
    
    587 587
           /* All scale paints get at least one scale value. */
    
    588
    -      apaint->u.scale.scale_x = FT_NEXT_LONG( p );
    
    588
    +      apaint->u.scale.scale_x = FT_NEXT_SHORT( p ) << 2;
    
    589 589
     
    
    590 590
           /* Non-uniform ones read an extra y value. */
    
    591 591
           if ( apaint->format ==
    
    592 592
                  FT_COLR_PAINTFORMAT_SCALE                 ||
    
    593 593
                (FT_PaintFormat_Internal)apaint->format ==
    
    594 594
                  FT_COLR_PAINTFORMAT_INTERNAL_SCALE_CENTER )
    
    595
    -        apaint->u.scale.scale_y = FT_NEXT_LONG( p );
    
    595
    +        apaint->u.scale.scale_y = FT_NEXT_SHORT( p ) << 2;
    
    596 596
           else
    
    597 597
             apaint->u.scale.scale_y = apaint->u.scale.scale_x;
    
    598 598
     
    
    ... ... @@ -603,8 +603,8 @@
    603 603
                (FT_PaintFormat_Internal)apaint->format ==
    
    604 604
                  FT_COLR_PAINTFORMAT_INTERNAL_SCALE_UNIFORM_CENTER )
    
    605 605
           {
    
    606
    -        apaint->u.scale.center_x = FT_NEXT_LONG ( p );
    
    607
    -        apaint->u.scale.center_y = FT_NEXT_LONG ( p );
    
    606
    +        apaint->u.scale.center_x = FT_NEXT_SHORT ( p ) << 16;
    
    607
    +        apaint->u.scale.center_y = FT_NEXT_SHORT ( p ) << 16;
    
    608 608
           }
    
    609 609
           else
    
    610 610
           {
    


  • reply via email to

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