gboolean gimp_plug_in_cleanup_remove_shadow (GimpPlugIn *plug_in, GimpDrawable *drawable) { GimpPlugInProcFrame *proc_frame; GimpPlugInCleanupItem *cleanup; g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), FALSE); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE); proc_frame = gimp_plug_in_get_proc_frame (plug_in); cleanup = gimp_plug_in_cleanup_item_get (proc_frame, GIMP_ITEM (drawable)); if (! cleanup) return FALSE; if (! cleanup->shadow_buffer) return FALSE; proc_frame->item_cleanups = g_list_remove (proc_frame->item_cleanups, cleanup); gimp_plug_in_cleanup_item_free (cleanup); return TRUE; }
gboolean gimp_plug_in_cleanup_add_shadow (GimpPlugIn *plug_in, GimpDrawable *drawable) { GimpPlugInProcFrame *proc_frame; GimpPlugInCleanupItem *cleanup; g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), FALSE); g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE); proc_frame = gimp_plug_in_get_proc_frame (plug_in); cleanup = gimp_plug_in_cleanup_item_get (proc_frame, GIMP_ITEM (drawable)); if (! cleanup) { cleanup = gimp_plug_in_cleanup_item_new (GIMP_ITEM (drawable)); proc_frame->item_cleanups = g_list_prepend (proc_frame->item_cleanups, cleanup); } cleanup->shadow_tiles = TRUE; return TRUE; }