[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] FT_Raster_Params::clip_box
From: |
n. |
Subject: |
[Freetype] FT_Raster_Params::clip_box |
Date: |
Fri, 04 Jan 2002 18:59:29 +0200 (EET) |
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, ¶ms);
#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] FT_Raster_Params::clip_box,
n. <=