freetype
[Top][All Lists]
Advanced

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

[ft] Scaled Outline Coordinates at Scanline Intersections


From: Infinality
Subject: [ft] Scaled Outline Coordinates at Scanline Intersections
Date: Fri, 19 Nov 2010 21:09:05 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Thunderbird/3.1.6

I am asking this from the point of view of the Freetype code, as opposed
to a client program using the code.  I am interested in being able to
calculate the value, in 26.6 coordinates, where the scanlines (at a
given ppem) intersect each point in a given outline.

For instance, as a crude example just using pixels:  If I'm dealing with
an outline of the letter "T", at 8x5 px, I'm looking for a result of
something like:

line 0 (top): 1.0 and 7.0
line 1      : 3.0 and 5.0
line 2      : 3.0 and 5.0
line 3      : 3.0 and 5.0
line 4      : 3.0 and 5.0

Which visually corresponds to:

|_|1|2|3|4|5|6|_|
|_|_|_|3|4|_|_|_|
|_|_|_|3|4|_|_|_|
|_|_|_|3|4|_|_|_|
|_|_|_|3|4|_|_|_|

What is the easiest way to obtain these values, given an outline and a
ppem?  I've looked in ftgrays.c, where I imagine I could obtain this
information, however I'm having a hard time comprehending what is
happening in there.

Thank you for any assistance!




reply via email to

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