Re: [gtk-list] Re: how to use gtk_gc_set_tile() ?

> Nancy Mazur <> writes:
> > 
> > I've been trying to play around with gdk_gc_set_tile(), 
> > but I don't seem to understand how it works.
> > Given some background pixmap, I'd like to draw some other pixmap
> > unto it, but in a tiled way. I thought that gdk_gc_set_tile would
> > lead me to the solution. If so.. can someone perhaps give me an
> > example of how to use it? 
> > 
> Tiles are explained briefly on page 228 (section 10.8) of my book.
> Quick summary: you need to set the "fill" mode to GDK_TILED, and then
> draw a filled shape like a filled rectangle or circle. The filled
> shape will use your tile pixmap as the fill.

okay, this wasn't clear to me. 
I first assumed that it would have been enough to simply initialise
the tile with some pixmap (gdk_gc_set_tile()). I didn't know
that an explicit (gdk_gc_set_fill()) was required. Many thanks.

> Doesn't sound like that's what you want; maybe you just want to draw a
> pixmap over and over into the window, or maybe you want to set your
> pixmap as the background pixmap (background pixmaps get tiled over the
> background).

The previous method worked fine for me. But just curiosity, 'cause
I didn't find the exact documentation of how to set backgrounds,
could you give me an example perhaps? 
How to set an image as background image on a drawingboard?

Learning all the time,

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