[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Defect: rasterizer precision is set wrongly by Set_High_Pre
From: |
David Turner |
Subject: |
Re: [Devel] Defect: rasterizer precision is set wrongly by Set_High_Precision |
Date: |
Sun, 27 May 2001 23:45:28 +0200 |
Hi Graham,
>
> Rasterizer precision is set by the local function Set_High_Precision in
> ftraster.c, called by Render_glyph and Render_Gray_Glyph. The idea is that
> when creating a cubic or conic Bezier spline by successive interpolation of
> points, interpolation stops if two coordinates are closer than the value of
> 'precision_step' in the TRasterInstance object. Thus a high value for
> precision_step causes low precision, and vice versa. However, the function
> Set_High_Precision sets precision_step to 128 for high precsion and 32 for
> low precision, which is clearly the reverse of what is wanted.
>
> Please let me know if I have misunderstood the intention of the code.
>
You're forgetting that the input coordinates are scaled, by
shifting them to the left by "precision_bits-6". So, the correct
figures are:
low precision:
bits = 6
step = 32 -> 0.5 pixels
high precision:
bits = 10
step = 128 -> 0.125 pixels
the step is thus 4 times smaller for high precision rendering
(the additional precision bits are used for more accurate
bezier subdivisions)
Regards,
- David