[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL
From: |
Алексей Подтележников |
Subject: |
Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL |
Date: |
Thu, 14 Oct 2010 07:42:27 -0400 |
2010/10/14 David Bevan <address@hidden>:
> Since there are two changes, (the value of FT_MAX_CURVE_DEVIATION and the
> algorithm),
> each must be tested independently.
David,
Focus please. This thread is about fixing deviations only by using ONE_PIXEL.
>>
>>
>> diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
>> index 17d172f..4828013 100644
>> --- a/src/smooth/ftgrays.c
>> +++ b/src/smooth/ftgrays.c
>> @@ -91,11 +91,6 @@
>> #define FT_COMPONENT trace_smooth
>>
>>
>> - /* The maximum distance of a curve from the chord, in 64ths of a pixel;
>> */
>> - /* used when flattening curves.
>> */
>> -#define FT_MAX_CURVE_DEVIATION 16
>> -
>> -
>> #ifdef _STANDALONE_
>>
>>
>> @@ -891,14 +886,14 @@ typedef ptrdiff_t FT_PtrDist;
>> if ( dx < dy )
>> dx = dy;
>>
>> - if ( dx <= FT_MAX_CURVE_DEVIATION )
>> + if ( dx <= ONE_PIXEL / 4 )
>> {
>> gray_render_line( RAS_VAR_ UPSCALE( to->x ), UPSCALE( to->y ) );
>> return;
>> }
>>
>> level = 1;
>> - dx /= FT_MAX_CURVE_DEVIATION;
>> + dx /= ONE_PIXEL / 4;
>> while ( dx > 1 )
>> {
>> dx >>= 2;
>> @@ -1074,7 +1069,7 @@ typedef ptrdiff_t FT_PtrDist;
>> goto Split;
>>
>> /* Max deviation may be as much as (s/L) * 3/4 (if Hain's v = 1).
>> */
>> - s_limit = L * (TPos)( FT_MAX_CURVE_DEVIATION / 0.75 );
>> + s_limit = L * (TPos)( ONE_PIXEL / 3 );
>>
>> /* s is L * the perpendicular distance from P1 to the line P0-P3.
>> */
>> dx1 = arc[1].x - arc[0].x;
>
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, (continued)
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, Алексей Подтележников, 2010/10/13
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, GRAHAM ASHER, 2010/10/13
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, Werner LEMBERG, 2010/10/13
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, Алексей Подтележников, 2010/10/13
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, James Cloos, 2010/10/14
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, Алексей Подтележников, 2010/10/14
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, Werner LEMBERG, 2010/10/14
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, James Cloos, 2010/10/14
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, Werner LEMBERG, 2010/10/15
- RE: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, David Bevan, 2010/10/14
- Re: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL,
Алексей Подтележников <=
RE: [ft-devel] FT_MAX_CURVE_DEVIATION vs ONE_PIXEL, David Bevan, 2010/10/13