freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 2 commits: [stroker] Minor clean-up.


From: Alexei Podtelezhnikov
Subject: [Git][freetype/freetype][master] 2 commits: [stroker] Minor clean-up.
Date: Wed, 27 Jan 2021 21:09:55 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-01-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	* src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps.
    
    4
    +
    
    5
    +	Fixes bug #1020.
    
    6
    +
    
    7
    +2021-01-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    8
    +
    
    9
    +	[stroker] Minor clean-up.
    
    10
    +
    
    11
    +	* src/base/ftstroke.c (FT_Stroker_{ConicTo,CubicTo}): Reset the last
    
    12
    +	line length.
    
    13
    +	(FT_Stroker_EndSubPath): Call `ft_stroker_process_corner'.
    
    14
    +
    
    1 15
     2021-01-27  Vincent Torri  <vincent.torri@gmail.com>
    
    2 16
     
    
    3 17
     	* builds/windows/ftsystem.c: Add shared memory support on Windows.
    

  • src/base/ftstroke.c
    ... ... @@ -1528,7 +1528,8 @@
    1528 1528
           stroker->angle_in = angle_out;
    
    1529 1529
         }
    
    1530 1530
     
    
    1531
    -    stroker->center = *to;
    
    1531
    +    stroker->center      = *to;
    
    1532
    +    stroker->line_length = 0;
    
    1532 1533
     
    
    1533 1534
       Exit:
    
    1534 1535
         return error;
    
    ... ... @@ -1744,7 +1745,8 @@
    1744 1745
           stroker->angle_in = angle_out;
    
    1745 1746
         }
    
    1746 1747
     
    
    1747
    -    stroker->center = *to;
    
    1748
    +    stroker->center      = *to;
    
    1749
    +    stroker->line_length = 0;
    
    1748 1750
     
    
    1749 1751
       Exit:
    
    1750 1752
         return error;
    
    ... ... @@ -1897,13 +1899,9 @@
    1897 1899
         }
    
    1898 1900
         else
    
    1899 1901
         {
    
    1900
    -      FT_Angle  turn;
    
    1901
    -      FT_Int    inside_side;
    
    1902
    -
    
    1903
    -
    
    1904 1902
           /* close the path if needed */
    
    1905
    -      if ( stroker->center.x != stroker->subpath_start.x ||
    
    1906
    -           stroker->center.y != stroker->subpath_start.y )
    
    1903
    +      if ( !FT_IS_SMALL( stroker->center.x - stroker->subpath_start.x ) ||
    
    1904
    +           !FT_IS_SMALL( stroker->center.y - stroker->subpath_start.y ) )
    
    1907 1905
           {
    
    1908 1906
              error = FT_Stroker_LineTo( stroker, &stroker->subpath_start );
    
    1909 1907
              if ( error )
    
    ... ... @@ -1912,29 +1910,11 @@
    1912 1910
     
    
    1913 1911
           /* process the corner */
    
    1914 1912
           stroker->angle_out = stroker->subpath_angle;
    
    1915
    -      turn               = FT_Angle_Diff( stroker->angle_in,
    
    1916
    -                                          stroker->angle_out );
    
    1917
    -
    
    1918
    -      /* no specific corner processing is required if the turn is 0 */
    
    1919
    -      if ( turn != 0 )
    
    1920
    -      {
    
    1921
    -        /* when we turn to the right, the inside side is 0 */
    
    1922
    -        /* otherwise, the inside side is 1 */
    
    1923
    -        inside_side = ( turn < 0 );
    
    1924
    -
    
    1925
    -        error = ft_stroker_inside( stroker,
    
    1926
    -                                   inside_side,
    
    1927
    -                                   stroker->subpath_line_length );
    
    1928
    -        if ( error )
    
    1929
    -          goto Exit;
    
    1930 1913
     
    
    1931
    -        /* process the outside side */
    
    1932
    -        error = ft_stroker_outside( stroker,
    
    1933
    -                                    !inside_side,
    
    1934
    -                                    stroker->subpath_line_length );
    
    1935
    -        if ( error )
    
    1936
    -          goto Exit;
    
    1937
    -      }
    
    1914
    +      error = ft_stroker_process_corner( stroker,
    
    1915
    +                                         stroker->subpath_line_length );
    
    1916
    +      if ( error )
    
    1917
    +        goto Exit;
    
    1938 1918
     
    
    1939 1919
           /* then end our two subpaths */
    
    1940 1920
           ft_stroke_border_close( stroker->borders + 0, FALSE );
    


  • reply via email to

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