Miscellaneous macro updates.
* src/base/ftoutln.c (SCALED): Updated. * src/smooth/ftgrays.c (SCALED): Ditto. (FLOOR, ROUND, CEILING): Removed. * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
This commit is contained in:
parent
65f9516bc7
commit
300458eb94
|
@ -1,3 +1,12 @@
|
|||
2019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
Miscellaneous macro updates.
|
||||
|
||||
* src/base/ftoutln.c (SCALED): Updated.
|
||||
* src/smooth/ftgrays.c (SCALED): Ditto.
|
||||
(FLOOR, ROUND, CEILING): Removed.
|
||||
* src/psaux/psfixed.h (cf2_fracToFixed): Updated.
|
||||
|
||||
2019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
Tweak LCD filtering.
|
||||
|
|
|
@ -46,8 +46,7 @@
|
|||
void* user )
|
||||
{
|
||||
#undef SCALED
|
||||
#define SCALED( x ) ( ( (x) < 0 ? -( -(x) << shift ) \
|
||||
: ( (x) << shift ) ) - delta )
|
||||
#define SCALED( x ) ( (x) * ( 1L << shift ) - delta )
|
||||
|
||||
FT_Vector v_last;
|
||||
FT_Vector v_control;
|
||||
|
|
|
@ -72,8 +72,7 @@ FT_BEGIN_HEADER
|
|||
#define cf2_fixedFraction( x ) \
|
||||
( (x) - cf2_fixedFloor( x ) )
|
||||
#define cf2_fracToFixed( x ) \
|
||||
( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 ) \
|
||||
: ( ( (x) + 0x2000 ) >> 14 ) )
|
||||
( ( (x) + 0x2000 - ( (x) < 0 ) ) >> 14 )
|
||||
|
||||
|
||||
/* signed numeric types */
|
||||
|
|
|
@ -327,17 +327,9 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
/* must be at least 6 bits! */
|
||||
#define PIXEL_BITS 8
|
||||
|
||||
#undef FLOOR
|
||||
#undef CEILING
|
||||
#undef TRUNC
|
||||
#undef SCALED
|
||||
|
||||
#define ONE_PIXEL ( 1 << PIXEL_BITS )
|
||||
#define TRUNC( x ) ( (TCoord)( (x) >> PIXEL_BITS ) )
|
||||
#define SUBPIXELS( x ) ( (TPos)(x) * ONE_PIXEL )
|
||||
#define FLOOR( x ) ( (x) & -ONE_PIXEL )
|
||||
#define CEILING( x ) ( ( (x) + ONE_PIXEL - 1 ) & -ONE_PIXEL )
|
||||
#define ROUND( x ) ( ( (x) + ONE_PIXEL / 2 ) & -ONE_PIXEL )
|
||||
|
||||
#if PIXEL_BITS >= 6
|
||||
#define UPSCALE( x ) ( (x) * ( ONE_PIXEL >> 6 ) )
|
||||
|
@ -1337,7 +1329,7 @@ typedef ptrdiff_t FT_PtrDist;
|
|||
void* user )
|
||||
{
|
||||
#undef SCALED
|
||||
#define SCALED( x ) ( ( (x) << shift ) - delta )
|
||||
#define SCALED( x ) ( (x) * ( 1L << shift ) - delta )
|
||||
|
||||
FT_Vector v_last;
|
||||
FT_Vector v_control;
|
||||
|
|
Loading…
Reference in New Issue