[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Another question about FT_Decompose_Outline
From: |
Brian Stell |
Subject: |
Re: [Freetype] Another question about FT_Decompose_Outline |
Date: |
Fri, 21 Mar 2003 09:25:01 -0800 |
Leonard Rosenthol wrote:
>
> At 5:31 PM +1100 3/21/03, ~ wrote:
> >my original question about the usage of FT_Decompose_Outline was
> >really about the functions pointed to by func_interface argument.
> >From my reading of the documentation, I had thought that the
> >functions to decompose a glyph into a series of curves and lines,
> >etc ,
> >(such as move_to, line_to, cubic_to) etc existed already somewhere
> >within freetype.
> >Is this not true.
> >In other words, do I have to implement the emitter functions myself ?
>
> No! FreeType will parse the glyph information and then
> call your routines (they are CALLBACKS, after all ;) with the
> specific operation that should be performed. What you choose to do
> with that info is up to you.
Your code calls FT_Decompose_Outline with a list of function
pointers to callbacks (your code) that you want FreeType to call
as it parse the segments of the outline.
Your callbacks/code will be called for each segment of the glyph.
For example passing the letter 'i' to FT_Decompose_Outline might
generate a movto callback (to your code) to set the start of the
base part of the 'i', 4 lineto callbacks to indicate outline
of the base part, a moveto callback to set the start of the
dot, 4 curveto callbacks to indicate the outline of the dot.
Each callback to your code will indicate the parameters for
that individual segment.
--
Brian Stell