Re: Drawing higher depth images

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

 



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?
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux