freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] FT_Raster_Params::clip_box


From: n++k
Subject: Re: [Freetype] FT_Raster_Params::clip_box
Date: Sun, 6 Jan 2002 12:54:10 +0200

| Hello "n." ???

Hi "d." :)

| What you describe is most probably a bug in the rasterizer.
| We're going to release 2.0.6 so we won't try to fix it
| right now..

Or perhaps it's a bug in the documentation. After having 
checked the rasterizer source, it appeared that the clip_box 
coordinates where in pixels and not in 26.6 format.. If
this is correct (and it seems to be) it should be added
to the entry in the freetype2 documentation

(excellent library design + documentation by the way)

Thanks!

| However, I'll see what we can do in the following weeks
| about that..
| 
| Cheers,
| 
| - David
| 
| 
| > 
| > Hi,
| > 
| > I am using freetype in direct mode, rendering outlines with
| > FT_Raster_Params::flags & ft_raster_flag_direct true. I'm experimenting
| > problems when trying to use FT's clipping (ft_raster_flag_clip) instead
| > of my own, as freetype continues to send me out of screen spans.
| > 
| > here's what i have:
| > 
| > #ifdef FT_CLIP
| >   {
| >     params.flags |= ft_raster_flag_clip;
| > 
| >     // corrected clip_box (pen_x, pen_y is the new origin of the outline)
| >     params.clip_box.xMin = (-pen_x) << 6;
| >     params.clip_box.xMax = (image->width - 1 - pen_x) << 6;
| >     params.clip_box.yMin = (-pen_y) << 6;
| >     params.clip_box.yMax = (image->height - 1 - pen_y) << 6;
| >   }
| > 
| >   error = FT_Outline_Render(library, &outline, &params);
| > #endif
| > 
| > Here i have to change the clip_box to translated values since
| > i'm doing the outline translation outside of freetype.
| > 
| > My draw_span routine is receiving spans well outside of the
| > clip_box, defeating the whole point of doing the clipping in freetype.
| > (which was to reduce the number of spans to go through my draw_span
| > function)
| > 
| > Anybody would have encountered the same problem or an idea why this is
| > happening?
| > 
| > Thanks,
| > --n++k
| > 
| > _______________________________________________
| > Freetype mailing list
| > address@hidden
| > http://www.freetype.org/mailman/listinfo/freetype
| 


--
  n
++k



reply via email to

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