freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Polygons


From: Giuliano Pochini
Subject: Re: [Freetype] Polygons
Date: Thu, 30 Aug 2001 17:21:33 +0200 (CEST)

> Basically, you have to put your data into an FT_Outline structure and
> calling FT_Outline_Render().

I can't make it work :-(( I fill the FT_Outline structure this way:


FT_Outline *ol;
FT_Vector *vec;
short *con;

  ol=malloc(sizeof(FT_Outline));
  if (FT_Outline_New(lib, 5, 1, ol))
    exit(0);

  vec=ol->points;
  con=ol->contours;

  vec[0].x = 64*x1;
  vec[0].y = 64*y1;
  ol->tags[0] = 1;
  vec[1].x = 64*x2;
  vec[1].y = 64*y2;
  ol->tags[1] = 1;
[...]
  vec[4].x = 64*x1;  // Same coords of vec[0]
  vec[4].y = 64*y1;  // to close the path.
  ol->tags[4] = 1;
  con[0] = 4;
[...]
  if (FT_Outline_Get_Bitmap(FTlib, ol, &bm))
    exit(0);


FreeType draws the antialiased perimeter of the polygon
without filling it. I also tried FT_Outline_Render() with
same result.



Bye.
    Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-




reply via email to

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