void gimp_pickable_srgb_to_pixel (GimpPickable *pickable, const GimpRGB *color, const Babl *format, gpointer pixel) { GimpPickableInterface *pickable_iface; g_return_if_fail (GIMP_IS_PICKABLE (pickable)); g_return_if_fail (color != NULL); g_return_if_fail (pixel != NULL); if (! format) format = gimp_pickable_get_format (pickable); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->srgb_to_pixel) { pickable_iface->srgb_to_pixel (pickable, color, format, pixel); } else { gimp_rgba_get_pixel (color, format, pixel); } }
void gimp_pickable_flush (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_if_fail (GIMP_IS_PICKABLE (pickable)); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->flush) pickable_iface->flush (pickable); }
const Babl * gimp_pickable_get_format (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_format) return pickable_iface->get_format (pickable); return NULL; }
GimpImage * gimp_pickable_get_image (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_image) return pickable_iface->get_image (pickable); return NULL; }
GeglBuffer * gimp_pickable_get_buffer (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_buffer) return pickable_iface->get_buffer (pickable); return NULL; }
GimpImageType gimp_pickable_get_image_type (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), -1); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_image_type) return pickable_iface->get_image_type (pickable); return -1; }
TileManager * gimp_pickable_get_tiles (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_tiles) return pickable_iface->get_tiles (pickable); return NULL; }
gint gimp_pickable_get_bytes (GimpPickable *pickable) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), 0); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_bytes) return pickable_iface->get_bytes (pickable); return 0; }
gdouble gimp_pickable_get_opacity_at (GimpPickable *pickable, gint x, gint y) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), GIMP_OPACITY_TRANSPARENT); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_opacity_at) return pickable_iface->get_opacity_at (pickable, x, y); return GIMP_OPACITY_TRANSPARENT; }
gint gimp_pickable_get_opacity_at (GimpPickable *pickable, gint x, gint y) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), 0); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_opacity_at) return pickable_iface->get_opacity_at (pickable, x, y); return 0; }
gboolean gimp_pickable_get_pixel_at (GimpPickable *pickable, gint x, gint y, guchar *pixel) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), FALSE); g_return_val_if_fail (pixel != NULL, FALSE); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_pixel_at) return pickable_iface->get_pixel_at (pickable, x, y, pixel); return FALSE; }
gboolean gimp_pickable_get_pixel_at (GimpPickable *pickable, gint x, gint y, const Babl *format, gpointer pixel) { GimpPickableInterface *pickable_iface; g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), FALSE); g_return_val_if_fail (pixel != NULL, FALSE); if (! format) format = gimp_pickable_get_format (pickable); pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable); if (pickable_iface->get_pixel_at) return pickable_iface->get_pixel_at (pickable, x, y, format, pixel); return FALSE; }