freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Outlines...


From: Werner LEMBERG
Subject: Re: [Devel] Outlines...
Date: Fri, 13 Jul 2001 04:12:57 +0200 (CEST)

> I had a look to the Outlines and specially to the FT_Outline
> structure. The documentation is a bit weird for me :-) I know to
> have a Bezier curve we needs a start point an eventual first control
> point, an eventual second control point and an ending point.

In computer graphics, second order and third order Bézier curves are
used; the former for TrueType, the latter for Type1 fonts.  What is
unclear in the doc (besides doubling of `giving')?

  /*    tags       :: A pointer to an array of `n_points' chars, giving
  /*                  giving each outline point's type.  If bit 0 is
  /*                  unset, the point is 'off' the curve, i.e. a Bezier
  /*                  control point, while it is `on' when set.
  /*
  /*                  Bit 1 is meaningful for `off' points only.  If set,
  /*                  it indicates a third-order Bezier arc control point;
  /*                  and a second-order control point if unset.

> So let's say we have a vector starting at (0,0) to (100,100), 2 control
> points (15,30) and (50,60)
> Should the tags be set as here below ?
> 
> Tag 0 First bit = 0
> Tag 1 First Bit = 1
> Tag 2 Second bit = 1
> Tag 3 First bit = 0

No.  Instead we have

    tag   bit 1   bit 2

     0     1       0       starting point (on)
     1     0       1       first control point (off, third order)
     2     0       1       second control point (off, third order)
     3     1       0       end point (on)


    Werner



reply via email to

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