Re: Get & Set pixel from a pixmap.



>I want to get & then set a pixel value from a GdkPixmap, but can't seem to
>find where to start.  I see that pixels can be manipulated in a GdkImage
>using gdk_image_get_pixel() & gdk_image_put_pixel(), however I need to
>manipulate an off-screen pixmap rather than a copy of the window.

you can't manipulate a GdkPixmap this way. its a server side resource,
and doesn't exist in the memory space of the client (modulo the MIT
SHM extension for X). the only way to manipulate it are through the
existing functions calls, and they do not (AFAIK) include any
pixel-level manipulation (though if you were insistent on this
approach, you could probably paint a single pixel line over and over :)

a GdkImage is a client side resource, and hence can be accessed on a
pixel-by-pixel basis. however, it has to be drawn en-masse to a window
in order to see it (same as a GdkPixmap, but requiring more data
transfer between the client and server.

--p



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