How To Draw Bitmaps From FreeType?
- From: Eric Mader <emader icu-project org>
- To: gtk-app-devel-list gnome org
- Subject: How To Draw Bitmaps From FreeType?
- Date: Sat, 23 Dec 2006 10:30:59 -1000
Hello,
I'm trying to render anti aliased bitmaps (i.e. 8 bits per pixel)
generated by FreeType. I tried to create a GdkPixmap from the pixels and
drawing it to the window using gdk_draw_drawable(), but that fails
because the depth of the src (8) and the depth of the window (24) are
different. I also tried to set the Pixmap as the stipple for the
graphics context, and that resulted in an X error, I think also because
of different depths.
What I'm thinking about trying next is to create an 8 bits per pixel
GdkPixbuf, filling it by hand from the FreeType bitmap and drawing that
using gdk_pixbuf_render_to_drawable(). Will that work, or will I still
get an error because the depths don't match?
I'm also thinking about creating a GdkPixbuf with a depth of 24 and
filling it by hand from the FreeType bitmap by copying the 8 bit pixel
value into all three components of the pixbuf. Will that work?
Regards,
Eric Mader
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]