Re: Drawing higher depth images
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Olexiy Avramchenko <olexiy ctech cn ua>
- Cc: gtk-list gnome org
- Subject: Re: Drawing higher depth images
- Date: Thu, 14 Jul 2005 22:03:06 +0200
On Tue, Jul 12, 2005 at 05:11:38PM +0300, Olexiy Avramchenko wrote:
> There's one trick:
> 1. Create a pixmap with depth of 32.
> 2. Create gc for the pixmap.
> 3. Set the 32-bit colour you want with gdk_gc_set_foreground()
> (0xAABBGGRR for the little-endian boxes, 0xRRGGBBAA for the big-endian
> ones).
> 4. Use any some GDK drawing primitives to draw on pixmap.
> 5. Create image from pixmap.
> 6. Create pixbuf with alpha-channel from image.
> 7. Do whatever you want with pixbuf.
>
> I think (didn't check, however, with a new GDK) that you'll not be able
> to draw a Pango layout to such pixmap with gdk_draw_layout(). The
> possible solution is to use X11 calls (they should work ok) or to render
> layout manually.
Thanks a lot, I need something cross platform, so I can't
use X11 calls, but redering text manually with FT2 is OK.
Yeti
P.S.: Sorry for the late reply ;)
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]