freetype
[Top][All Lists]
Advanced

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

Re: Using the FreeType 2.0 Polygon Rasterizer in a Graphics Package


From: David Turner
Subject: Re: Using the FreeType 2.0 Polygon Rasterizer in a Graphics Package
Date: Wed, 08 Mar 2000 15:17:47 +0100

Hi Matthew,

"Feinberg, Matthew" a écrit :
> 
> The company I work for is developing a software package that (for
> cross-platform consistency) draws all its own graphics primitives.  This
> basically means that the software has a complete graphics package built
> into it.
> 
> I've been thinking of using the FreeType 2.0 polygon rasterizer, since I
> understand that it can be separated from the rest of the FreeType
> library fairly easily.
> 
That's true, you basically need to copy "ftimage.h" and "ftraster.c" to your
local directory, then compile "ftraster.c" with the macro _STANDALONE_ defined,
as in:
  
  gcc -I. ftraster.c -D_STANDALONE_

This will compile the raster as a stand-alone module. Note that you may need
to plug it to your graphics library in some way..

> What I want to know is:
> 
> 1)  Has anyone done this before?
> 2)  FreeType 1.x rendered to temporary pixmap that had to be copied
> (with alpha compositing) to the main pixmap.  Can FreeType 2.0 rasterize
> directly to the main canvas?  If not, can it be modified to do so?  What
> about handling different canvas types (RGB, indexed color, etc.)?  What
> about raster operations (XOR, etc.)
> 
The algorithm in the ftraster.c really needs a temporary pixmap, as it performs
two passes on it (the second one being much faster than the first one). So you
won't be able to modify it to do direct composition on a background surface,
sorry..

> Finally, if anyone would be interested in doing some coding in C on a
> contract basis to hook FreeType 2.0 into our software's graphics
> package, please contact me.
> 
Well, I'm currently too busy to do this ;-) Maybe someone else on the list..

- David

> --
> Matthew A. Feinberg
> Lead Programmer
> Catharon Productions, Inc.
> 2119 Route 66, Ghent, NY 12075, USA
> 
> E-Mail:  address@hidden
> Web:  http://www.catharon.com
> 
> Tel: (518)392-9003
> Fax: (518)392-6444



reply via email to

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