freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] * src/base/ftoutln.c (FT_Outline_Revers


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points.
Date: Fri, 17 Feb 2023 04:09:21 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 74ea5454
    by Alex Ringlein at 2023-02-16T22:38:35-05:00
    * src/base/ftoutln.c (FT_Outline_Reverse): Anchor first contour points.
    
    A cubic contour has to always start from an on-point. Therefore, we
    should not swap the first with the last point, which might be off, and
    obtain an invalid contour. This does not matter for conic contours.
    If anything, it also saves one swap there. Fixes #1207.
    

1 changed file:

Changes:

  • src/base/ftoutln.c
    ... ... @@ -556,6 +556,10 @@
    556 556
         {
    
    557 557
           last  = outline->contours[n];
    
    558 558
     
    
    559
    +      /* keep the first contour point as is and swap points around it */
    
    560
    +      /* to guarantee that the cubic arches stay valid after reverse  */
    
    561
    +      first++;
    
    562
    +
    
    559 563
           /* reverse point table */
    
    560 564
           {
    
    561 565
             FT_Vector*  p = outline->points + first;
    


  • reply via email to

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