Re: copying pixmaps



On Mon, Jun 25, 2001 at 12:15:51AM -0500, Joel Uckelman wrote:
> Hi,
> 
> I writing something for which I need two separate copies of the same 
> GdkPixmap--one of which will be drawn to, while the other is used to 
> restore areas of the first to their initial state. Since the XPMs I'm 
> loading to make GdkPixmaps have the potential to be rather large, it would 
> be nice if I could load them once and then make copies in memory instead of 
> calling gdk_pixmap_create_from_xpm twice. I presume there is some simple 
> way to do this, but I don't see any copy functions.
> 
> Is there a way to get the dimensions of a GdkPixmap after creating it from 
> an arbitrarily-sized XPM? If I could do that my problem would be solved, 
> since I could create a blank GdkPixmap of the appropriate size and use 
> gdk_draw_pixmap to copy from one to the other.
> 
> Any help would be greatly appreciated.

You can pass -1 to the width and height arguments of gdk_draw_pixmap, and the entire pixmap will be copied





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