freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] regarding freetype 2 cubic curve flattening


From: Vivek Rathod
Subject: Re: [ft-devel] regarding freetype 2 cubic curve flattening
Date: Mon, 31 Oct 2011 17:13:10 +0530

On Mon, Oct 31, 2011 at 4:45 PM, Alexei Podtelezhnikov
<address@hidden> wrote:
> On Mon, Oct 31, 2011 at 3:22 AM, Vivek Rathod <address@hidden> wrote:
>> s is calculated as
>> "s = FT_ABS( dy * dx1 - dx * dy1 );"   which means s is the perpendicular
>> distance of the control point from chord multiplied by L
>>
>
>> which means currently  s_limit is being compared with perpendicular distance
>> of control point * L .
>
> Correct. s_limit is also multiplied by L on line 1065 in ftgrays.c:
>
> s_limit = L * (TPos)( ONE_PIXEL / 6 );
>
> I do not see a problem here.
The formula for deviation ( from Hein's paper).
d = dnorm * s ; here s is normalized ------------------- (1)
so the formula when s is not normalized becomes d = dnorm * (s / L)  ;
-----------------(2)
and I think the L you are mentioning comes from this formula.
therefore s = (dmax/dnorm) * L;

Please correct me if I am wrong about this whole normalization assumption.
>
>> but s_limit is actual distance, so in order to do the correct comparison
>> (and to avoid division) don't you think we need to multiply s_limit once
>> more by L  ?
>
> This is wrong. Look at the actual code.
>



reply via email to

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