1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
Function omagtk_pixmap_getpixel(obj as tomagtk_pixmap ptr, x as integer, y as integer) as guint32
dim as GdkImage ptr img
dim as guint32 retval
img=gdk_drawable_get_image(obj->pix,0,0,obj->nx,obj->ny)
if (obj->pix=NULL) then brkmess("Error in omagtk_pixmap_getpixel(): pixmap not initialized")
if (x<0 or x>obj->nx-1 or y<0 or y>obj->nx-1) then brkmess("Error in omagtk_pixmap_getpixel(): coordinates boundary error")
retval= gdk_image_get_pixel(obj->pix, x , y )
Function=retval
End Function
|