forked from minhngoc25a/freetype2
* src/truetype/ttgxvar.c (ft_var_to_normalized): Edge optimization.
This commit is contained in:
parent
188c7d6670
commit
c5cd2a3db4
|
@ -1883,19 +1883,16 @@
|
||||||
" clamping\n",
|
" clamping\n",
|
||||||
a->minimum / 65536.0,
|
a->minimum / 65536.0,
|
||||||
a->maximum / 65536.0 ));
|
a->maximum / 65536.0 ));
|
||||||
|
|
||||||
if ( coord > a->maximum )
|
|
||||||
coord = a->maximum;
|
|
||||||
else
|
|
||||||
coord = a->minimum;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( coord < a->def )
|
if ( coord > a->def )
|
||||||
normalized[i] = -FT_DivFix( SUB_LONG( coord, a->def ),
|
normalized[i] = coord >= a->maximum ? 0x10000L :
|
||||||
SUB_LONG( a->minimum, a->def ) );
|
FT_DivFix( SUB_LONG( coord, a->def ),
|
||||||
else if ( coord > a->def )
|
|
||||||
normalized[i] = FT_DivFix( SUB_LONG( coord, a->def ),
|
|
||||||
SUB_LONG( a->maximum, a->def ) );
|
SUB_LONG( a->maximum, a->def ) );
|
||||||
|
else if ( coord < a->def )
|
||||||
|
normalized[i] = coord <= a->minimum ? -0x10000L :
|
||||||
|
FT_DivFix( SUB_LONG( coord, a->def ),
|
||||||
|
SUB_LONG( a->def, a->minimum ) );
|
||||||
else
|
else
|
||||||
normalized[i] = 0;
|
normalized[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue