Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
295962dc
by Alexei Podtelezhnikov (Алексей Подтележников) at 2023-12-12T22:45:19-05:00
-
621556d6
by Alexei Podtelezhnikov (Алексей Подтележников) at 2023-12-13T23:14:15-05:00
2 changed files:
Changes:
1 | +*.user
|
|
2 | +.vs/ |
... | ... | @@ -121,17 +121,17 @@ |
121 | 121 | v = outline->points[p];
|
122 | 122 | d.x -= v.x;
|
123 | 123 | d.y -= v.y;
|
124 | - dx = SIGN( d.x );
|
|
125 | - dy = SIGN( d.y );
|
|
126 | 124 | |
127 | - if ( dx )
|
|
125 | + if ( d.x )
|
|
128 | 126 | {
|
127 | + dx = SIGN( d.x );
|
|
129 | 128 | sx += ( dx == -bx ); /* count turns */
|
130 | 129 | bx = dx;
|
131 | 130 | }
|
132 | 131 | |
133 | - if ( dy )
|
|
132 | + if ( d.y )
|
|
134 | 133 | {
|
134 | + dy = SIGN( d.y );
|
|
135 | 135 | sy += ( dy == -by ); /* count turns */
|
136 | 136 | by = dy;
|
137 | 137 | }
|
... | ... | @@ -139,8 +139,8 @@ |
139 | 139 | d = v;
|
140 | 140 | }
|
141 | 141 | |
142 | - /* count is odd only if initial turn is missed */
|
|
143 | - /* round it to even and proceed to next contour */
|
|
142 | + /* counts must be even unless the first turn was missed */
|
|
143 | + /* so make them even and proceed to the next contour */
|
|
144 | 144 | sx += sx & 1;
|
145 | 145 | sy += sy & 1;
|
146 | 146 | }
|