renamed all files and also changed function names and stuff in some files.
2008-03-24 Michael Natterer <mitch@gimp.org> * plug-ins/color-rotate/*: renamed all files and also changed function names and stuff in some files. Only the filename change is 100% complete. svn path=/trunk/; revision=25199
|
@ -1,3 +1,9 @@
|
|||
2008-03-24 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* plug-ins/color-rotate/*: renamed all files and also changed
|
||||
function names and stuff in some files. Only the filename change
|
||||
is 100% complete.
|
||||
|
||||
2008-03-24 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
There is no colormap involved in this plug-in, rename it again...
|
||||
|
|
|
@ -18,21 +18,21 @@ SUBDIRS = images
|
|||
|
||||
libexecdir = $(gimpplugindir)/plug-ins
|
||||
|
||||
libexec_PROGRAMS = rcm
|
||||
libexec_PROGRAMS = color-rotate
|
||||
|
||||
rcm_SOURCES = \
|
||||
rcm.c \
|
||||
rcm.h \
|
||||
rcm_callback.c \
|
||||
rcm_callback.h \
|
||||
rcm_dialog.c \
|
||||
rcm_dialog.h \
|
||||
rcm_gdk.c \
|
||||
rcm_gdk.h \
|
||||
rcm_misc.c \
|
||||
rcm_misc.h \
|
||||
rcm_stock.c \
|
||||
rcm_stock.h
|
||||
color_rotate_SOURCES = \
|
||||
color-rotate.c \
|
||||
color-rotate.h \
|
||||
color-rotate-callbacks.c \
|
||||
color-rotate-callbacks.h \
|
||||
color-rotate-dialog.c \
|
||||
color-rotate-dialog.h \
|
||||
color-rotate-draw.c \
|
||||
color-rotate-draw.h \
|
||||
color-rotate-utils.c \
|
||||
color-rotate-utils.h \
|
||||
color-rotate-stock.c \
|
||||
color-rotate-stock.h
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
|
|
|
@ -41,14 +41,14 @@
|
|||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
|
||||
#include "rcm.h"
|
||||
#include "rcm_misc.h"
|
||||
#include "rcm_gdk.h"
|
||||
#include "rcm_dialog.h"
|
||||
#include "rcm_callback.h"
|
||||
#include "rcm_stock.h"
|
||||
#include "color-rotate.h"
|
||||
#include "color-rotate-utils.h"
|
||||
#include "color-rotate-draw.h"
|
||||
#include "color-rotate-dialog.h"
|
||||
#include "color-rotate-callbacks.h"
|
||||
#include "color-rotate-stock.h"
|
||||
|
||||
#include "images/rcm-stock-pixbufs.h"
|
||||
#include "images/color-rotate-stock-pixbufs.h"
|
||||
|
||||
|
||||
/* Misc functions */
|
||||
|
@ -87,8 +87,9 @@ rcm_360_degrees (GtkWidget *button,
|
|||
circle->action_flag = DO_NOTHING;
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
circle->angle->beta = circle->angle->alpha-circle->angle->cw_ccw * 0.001;
|
||||
rcm_draw_arrows (circle->preview->window, circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
color_rotate_draw_arrows (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
circle->action_flag = VIRGIN;
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
}
|
||||
|
@ -102,8 +103,8 @@ rcm_cw_ccw (GtkWidget *button,
|
|||
g_object_set (button,
|
||||
"label",
|
||||
(circle->angle->cw_ccw>0) ?
|
||||
STOCK_COLORMAP_SWITCH_CLOCKWISE :
|
||||
STOCK_COLORMAP_SWITCH_COUNTERCLOCKWISE,
|
||||
STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE :
|
||||
STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE,
|
||||
"use_stock", TRUE,
|
||||
NULL);
|
||||
|
||||
|
@ -119,8 +120,9 @@ rcm_a_to_b (GtkWidget *button,
|
|||
|
||||
SWAP (circle->angle->alpha, circle->angle->beta);
|
||||
|
||||
rcm_draw_arrows (circle->preview->window, circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
color_rotate_draw_arrows (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
|
||||
circle->action_flag = VIRGIN;
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
|
@ -346,7 +348,9 @@ rcm_expose_event (GtkWidget *widget,
|
|||
{
|
||||
if (circle->action_flag == VIRGIN)
|
||||
{
|
||||
rcm_draw_arrows (widget->window, widget->style->black_gc, circle->angle);
|
||||
color_rotate_draw_arrows (widget->window,
|
||||
widget->style->black_gc,
|
||||
circle->angle);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -381,8 +385,9 @@ rcm_button_press_event (GtkWidget *widget,
|
|||
{
|
||||
*(circle->target) = clicked_angle;
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
rcm_draw_arrows (widget->window,
|
||||
widget->style->black_gc, circle->angle);
|
||||
color_rotate_draw_arrows (widget->window,
|
||||
widget->style->black_gc,
|
||||
circle->angle);
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (circle->alpha_entry),
|
||||
circle->angle->alpha *
|
||||
|
@ -410,7 +415,9 @@ rcm_release_event (GtkWidget *widget,
|
|||
if (circle->action_flag == DRAGING)
|
||||
{
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
rcm_draw_arrows (widget->window, widget->style->black_gc, circle->angle);
|
||||
color_rotate_draw_arrows (widget->window,
|
||||
widget->style->black_gc,
|
||||
circle->angle);
|
||||
}
|
||||
|
||||
circle->action_flag = VIRGIN;
|
||||
|
@ -457,7 +464,7 @@ rcm_motion_notify_event (GtkWidget *widget,
|
|||
else
|
||||
{
|
||||
/* this should be erasing entire angle */
|
||||
rcm_draw_arrows (widget->window, xor_gc, circle->angle);
|
||||
color_rotate_draw_arrows (widget->window, xor_gc, circle->angle);
|
||||
}
|
||||
|
||||
if (circle->mode == EACH)
|
||||
|
@ -471,7 +478,7 @@ rcm_motion_notify_event (GtkWidget *widget,
|
|||
}
|
||||
|
||||
gdk_window_process_updates (widget->window, FALSE);
|
||||
rcm_draw_arrows (widget->window, xor_gc, circle->angle);
|
||||
color_rotate_draw_arrows (widget->window, xor_gc, circle->angle);
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (circle->alpha_entry),
|
||||
circle->angle->alpha *
|
||||
|
@ -498,11 +505,11 @@ rcm_gray_expose_event (GtkWidget *widget,
|
|||
{
|
||||
if (circle->action_flag == VIRGIN)
|
||||
{
|
||||
rcm_draw_little_circle (widget->window, widget->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
color_rotate_draw_little_circle (widget->window, widget->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
|
||||
rcm_draw_large_circle (widget->window,
|
||||
widget->style->black_gc, circle->gray_sat);
|
||||
color_rotate_draw_large_circle (widget->window,
|
||||
widget->style->black_gc, circle->gray_sat);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -528,12 +535,12 @@ rcm_gray_button_press_event (GtkWidget *widget,
|
|||
circle->satur = 1;
|
||||
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
rcm_draw_little_circle (widget->window, widget->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
color_rotate_draw_little_circle (widget->window, widget->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
|
||||
rcm_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
color_rotate_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (circle->hue_entry),
|
||||
circle->hue * rcm_units_factor (Current.Units));
|
||||
|
@ -553,10 +560,10 @@ rcm_gray_release_event (GtkWidget *widget,
|
|||
RcmGray *circle)
|
||||
{
|
||||
if (circle->action_flag == DRAGING)
|
||||
rcm_draw_little_circle (widget->window,
|
||||
widget->style->black_gc,
|
||||
circle->hue,
|
||||
circle->satur);
|
||||
color_rotate_draw_little_circle (widget->window,
|
||||
widget->style->black_gc,
|
||||
circle->hue,
|
||||
circle->satur);
|
||||
|
||||
circle->action_flag = VIRGIN;
|
||||
|
||||
|
@ -581,16 +588,16 @@ rcm_gray_motion_notify_event (GtkWidget *widget,
|
|||
if (circle->action_flag == DRAG_START)
|
||||
{
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
rcm_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
color_rotate_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
|
||||
circle->action_flag = DRAGING;
|
||||
}
|
||||
else
|
||||
{
|
||||
rcm_draw_little_circle (widget->window, xor_gc,
|
||||
circle->hue, circle->satur); /* erase */
|
||||
color_rotate_draw_little_circle (widget->window, xor_gc,
|
||||
circle->hue, circle->satur); /* erase */
|
||||
}
|
||||
|
||||
gdk_window_get_pointer (widget->window, &x, &y, NULL);
|
||||
|
@ -604,7 +611,8 @@ rcm_gray_motion_notify_event (GtkWidget *widget,
|
|||
if (circle->satur > 1.0)
|
||||
circle->satur = 1;
|
||||
|
||||
rcm_draw_little_circle (widget->window, xor_gc, circle->hue, circle->satur);
|
||||
color_rotate_draw_little_circle (widget->window, xor_gc,
|
||||
circle->hue, circle->satur);
|
||||
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (circle->hue_entry),
|
||||
circle->hue * rcm_units_factor(Current.Units));
|
||||
|
@ -635,8 +643,9 @@ rcm_set_alpha (GtkWidget *entry,
|
|||
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
|
||||
rcm_draw_arrows (circle->preview->window, circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
color_rotate_draw_arrows (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
}
|
||||
|
@ -655,8 +664,9 @@ rcm_set_beta (GtkWidget *entry,
|
|||
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
|
||||
rcm_draw_arrows (circle->preview->window, circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
color_rotate_draw_arrows (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->angle);
|
||||
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
}
|
||||
|
@ -675,13 +685,13 @@ rcm_set_hue (GtkWidget *entry,
|
|||
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
|
||||
rcm_draw_little_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
color_rotate_draw_little_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
|
||||
rcm_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
color_rotate_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
}
|
||||
|
@ -699,13 +709,13 @@ rcm_set_satur (GtkWidget *entry,
|
|||
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
|
||||
rcm_draw_little_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
color_rotate_draw_little_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->hue, circle->satur);
|
||||
|
||||
rcm_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
color_rotate_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
}
|
||||
|
@ -720,9 +730,9 @@ rcm_set_gray_sat (GtkWidget *entry,
|
|||
|
||||
gtk_widget_queue_draw (circle->preview);
|
||||
|
||||
rcm_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
color_rotate_draw_large_circle (circle->preview->window,
|
||||
circle->preview->style->black_gc,
|
||||
circle->gray_sat);
|
||||
|
||||
rcm_render_preview (Current.Bna->after);
|
||||
}
|
|
@ -41,14 +41,14 @@
|
|||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "rcm.h"
|
||||
#include "rcm_misc.h"
|
||||
#include "rcm_gdk.h"
|
||||
#include "rcm_callback.h"
|
||||
#include "rcm_dialog.h"
|
||||
#include "rcm_stock.h"
|
||||
#include "color-rotate.h"
|
||||
#include "color-rotate-utils.h"
|
||||
#include "color-rotate-draw.h"
|
||||
#include "color-rotate-callbacks.h"
|
||||
#include "color-rotate-dialog.h"
|
||||
#include "color-rotate-stock.h"
|
||||
|
||||
#include "images/rcm-stock-pixbufs.h"
|
||||
#include "images/color-rotate-stock-pixbufs.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
@ -250,8 +250,8 @@ rcm_create_one_circle (gint height,
|
|||
/** Main: Circle: Buttons **/
|
||||
|
||||
button = gtk_button_new_from_stock (st->angle->cw_ccw > 0 ?
|
||||
STOCK_COLORMAP_SWITCH_CLOCKWISE :
|
||||
STOCK_COLORMAP_SWITCH_COUNTERCLOCKWISE);
|
||||
STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE :
|
||||
STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (rcm_cw_ccw),
|
||||
st);
|
||||
|
@ -265,7 +265,7 @@ rcm_create_one_circle (gint height,
|
|||
st->cw_ccw_box = NULL;
|
||||
st->cw_ccw_label = NULL;
|
||||
|
||||
button = gtk_button_new_from_stock (STOCK_COLORMAP_CHANGE_ORDER);
|
||||
button = gtk_button_new_from_stock (STOCK_COLOR_ROTATE_CHANGE_ORDER);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (rcm_a_to_b),
|
||||
st);
|
||||
|
@ -278,7 +278,7 @@ rcm_create_one_circle (gint height,
|
|||
st->a_b_box = NULL;
|
||||
st->a_b_button = button;
|
||||
|
||||
button = gtk_button_new_from_stock (STOCK_COLORMAP_SELECT_ALL);
|
||||
button = gtk_button_new_from_stock (STOCK_COLOR_ROTATE_SELECT_ALL);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (rcm_360_degrees),
|
||||
st);
|
||||
|
@ -636,7 +636,7 @@ rcm_create_units (void)
|
|||
/* create and call main dialog */
|
||||
|
||||
gboolean
|
||||
rcm_dialog (void)
|
||||
color_rotate_dialog (void)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *hbox;
|
||||
|
@ -647,7 +647,7 @@ rcm_dialog (void)
|
|||
Current.Bna = g_new (RcmBna, 1);
|
||||
|
||||
gimp_ui_init (PLUG_IN_BINARY, TRUE);
|
||||
rcm_stock_init ();
|
||||
color_rotate_stock_init ();
|
||||
|
||||
dialog = gimp_dialog_new (_("Rotate Colors"), PLUG_IN_BINARY,
|
||||
NULL, 0,
|
|
@ -44,4 +44,4 @@
|
|||
|
||||
/* Procedures */
|
||||
|
||||
gboolean rcm_dialog (void);
|
||||
gboolean color_rotate_dialog (void);
|
|
@ -41,10 +41,10 @@
|
|||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "rcm.h"
|
||||
#include "rcm_misc.h"
|
||||
#include "rcm_dialog.h"
|
||||
#include "rcm_gdk.h"
|
||||
#include "color-rotate.h"
|
||||
#include "color-rotate-utils.h"
|
||||
#include "color-rotate-dialog.h"
|
||||
#include "color-rotate-draw.h"
|
||||
|
||||
|
||||
/* Global variables */
|
||||
|
@ -55,10 +55,10 @@ GdkGC *xor_gc;
|
|||
/* Drawing routines */
|
||||
|
||||
void
|
||||
rcm_draw_little_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat hue,
|
||||
gfloat satur)
|
||||
color_rotate_draw_little_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat hue,
|
||||
gfloat satur)
|
||||
{
|
||||
gint x,y;
|
||||
|
||||
|
@ -70,9 +70,9 @@ rcm_draw_little_circle (GdkWindow *window,
|
|||
}
|
||||
|
||||
void
|
||||
rcm_draw_large_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat gray_sat)
|
||||
color_rotate_draw_large_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat gray_sat)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
|
@ -93,9 +93,9 @@ rcm_draw_large_circle (GdkWindow *window,
|
|||
#define TICK 10
|
||||
|
||||
void
|
||||
rcm_draw_arrows (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
RcmAngle *angle)
|
||||
color_rotate_draw_arrows (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
RcmAngle *angle)
|
||||
{
|
||||
gint dist;
|
||||
gfloat alpha, beta, cw_ccw, delta;
|
|
@ -59,13 +59,13 @@
|
|||
extern GdkGC *xor_gc;
|
||||
|
||||
|
||||
void rcm_draw_little_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat hue,
|
||||
gfloat satur);
|
||||
void rcm_draw_large_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat gray_sat);
|
||||
void rcm_draw_arrows (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
RcmAngle *angle);
|
||||
void color_rotate_draw_little_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat hue,
|
||||
gfloat satur);
|
||||
void color_rotate_draw_large_circle (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
gfloat gray_sat);
|
||||
void color_rotate_draw_arrows (GdkWindow *window,
|
||||
GdkGC *color,
|
||||
RcmAngle *angle);
|
|
@ -20,24 +20,24 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "rcm_stock.h"
|
||||
#include "color-rotate-stock.h"
|
||||
|
||||
#include "images/rcm-stock-pixbufs.h"
|
||||
#include "images/color-rotate-stock-pixbufs.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
static GtkIconFactory *rcm_icon_factory = NULL;
|
||||
static GtkIconFactory *color_rotate_icon_factory = NULL;
|
||||
|
||||
static GtkStockItem rcm_stock_items[] =
|
||||
static GtkStockItem color_rotate_stock_items[] =
|
||||
{
|
||||
{ STOCK_COLORMAP_SWITCH_CLOCKWISE,
|
||||
{ STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE,
|
||||
N_("Switch to Clockwise"), 0, 0, NULL },
|
||||
{ STOCK_COLORMAP_SWITCH_COUNTERCLOCKWISE,
|
||||
{ STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE,
|
||||
N_("Switch to C/Clockwise"), 0, 0, NULL },
|
||||
{ STOCK_COLORMAP_CHANGE_ORDER,
|
||||
{ STOCK_COLOR_ROTATE_CHANGE_ORDER,
|
||||
N_("Change Order of Arrows"), 0, 0, NULL },
|
||||
{ STOCK_COLORMAP_SELECT_ALL,
|
||||
{ STOCK_COLOR_ROTATE_SELECT_ALL,
|
||||
N_("Select All"), 0, 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -66,33 +66,34 @@ add_stock_icon (const gchar *stock_id,
|
|||
gtk_icon_set_add_source (set, source);
|
||||
gtk_icon_source_free (source);
|
||||
|
||||
gtk_icon_factory_add (rcm_icon_factory, stock_id, set);
|
||||
gtk_icon_factory_add (color_rotate_icon_factory, stock_id, set);
|
||||
|
||||
gtk_icon_set_unref (set);
|
||||
}
|
||||
|
||||
void
|
||||
rcm_stock_init (void)
|
||||
color_rotate_stock_init (void)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
|
||||
if (initialized)
|
||||
return;
|
||||
|
||||
rcm_icon_factory = gtk_icon_factory_new ();
|
||||
color_rotate_icon_factory = gtk_icon_factory_new ();
|
||||
|
||||
add_stock_icon (STOCK_COLORMAP_SWITCH_CLOCKWISE,
|
||||
GTK_ICON_SIZE_BUTTON, rcm_cw);
|
||||
add_stock_icon (STOCK_COLORMAP_SWITCH_COUNTERCLOCKWISE,
|
||||
GTK_ICON_SIZE_BUTTON, rcm_ccw);
|
||||
add_stock_icon (STOCK_COLORMAP_CHANGE_ORDER,
|
||||
GTK_ICON_SIZE_BUTTON, rcm_a_b);
|
||||
add_stock_icon (STOCK_COLORMAP_SELECT_ALL,
|
||||
GTK_ICON_SIZE_BUTTON, rcm_360);
|
||||
add_stock_icon (STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE,
|
||||
GTK_ICON_SIZE_BUTTON, color_rotate_cw);
|
||||
add_stock_icon (STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE,
|
||||
GTK_ICON_SIZE_BUTTON, color_rotate_ccw);
|
||||
add_stock_icon (STOCK_COLOR_ROTATE_CHANGE_ORDER,
|
||||
GTK_ICON_SIZE_BUTTON, color_rotate_a_b);
|
||||
add_stock_icon (STOCK_COLOR_ROTATE_SELECT_ALL,
|
||||
GTK_ICON_SIZE_BUTTON, color_rotate_360);
|
||||
|
||||
gtk_icon_factory_add_default (rcm_icon_factory);
|
||||
gtk_icon_factory_add_default (color_rotate_icon_factory);
|
||||
|
||||
gtk_stock_add_static (rcm_stock_items, G_N_ELEMENTS (rcm_stock_items));
|
||||
gtk_stock_add_static (color_rotate_stock_items,
|
||||
G_N_ELEMENTS (color_rotate_stock_items));
|
||||
|
||||
initialized = TRUE;
|
||||
}
|
|
@ -16,17 +16,17 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __RCM_STOCK_H__
|
||||
#define __RCM_STOCK_H__
|
||||
#ifndef __COLOR_ROTATE_STOCK_H__
|
||||
#define __COLOR_ROTATE_STOCK_H__
|
||||
|
||||
|
||||
#define STOCK_COLORMAP_SWITCH_CLOCKWISE "rcm_cw"
|
||||
#define STOCK_COLORMAP_SWITCH_COUNTERCLOCKWISE "rcm_ccw"
|
||||
#define STOCK_COLORMAP_CHANGE_ORDER "rcm_a_b"
|
||||
#define STOCK_COLORMAP_SELECT_ALL "rcm_360"
|
||||
#define STOCK_COLOR_ROTATE_SWITCH_CLOCKWISE "color_rotate_cw"
|
||||
#define STOCK_COLOR_ROTATE_SWITCH_COUNTERCLOCKWISE "color_rotate_ccw"
|
||||
#define STOCK_COLOR_ROTATE_CHANGE_ORDER "color_rotate_a_b"
|
||||
#define STOCK_COLOR_ROTATE_SELECT_ALL "color_rotate_360"
|
||||
|
||||
|
||||
void rcm_stock_init (void);
|
||||
void color_rotate_stock_init (void);
|
||||
|
||||
|
||||
#endif /* __RCM_STOCK_H__ */
|
||||
#endif /* __COLOR_ROTATE_STOCK_H__ */
|
|
@ -41,9 +41,10 @@
|
|||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
|
||||
#include "rcm.h"
|
||||
#include "rcm_misc.h"
|
||||
#include "rcm_gdk.h"
|
||||
#include "color-rotate.h"
|
||||
#include "color-rotate-utils.h"
|
||||
#include "color-rotate-draw.h"
|
||||
|
||||
|
||||
float
|
||||
arctg (float y,
|
|
@ -41,24 +41,24 @@
|
|||
#include "libgimp/gimp.h"
|
||||
#include "libgimp/gimpui.h"
|
||||
|
||||
#include "rcm.h"
|
||||
#include "rcm_misc.h"
|
||||
#include "rcm_dialog.h"
|
||||
#include "rcm_callback.h"
|
||||
#include "color-rotate.h"
|
||||
#include "color-rotate-utils.h"
|
||||
#include "color-rotate-dialog.h"
|
||||
#include "color-rotate-callbacks.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static void rcm (GimpDrawable *drawable);
|
||||
static void color_rotate (GimpDrawable *drawable);
|
||||
|
||||
|
||||
/* Global variables */
|
||||
|
@ -135,13 +135,13 @@ run (const gchar *name,
|
|||
|
||||
if (gimp_drawable_is_rgb (Current.drawable->drawable_id))
|
||||
{
|
||||
if (rcm_dialog ())
|
||||
if (color_rotate_dialog ())
|
||||
{
|
||||
gimp_progress_init (_("Rotating the colors"));
|
||||
|
||||
gimp_tile_cache_ntiles (2 * (Current.drawable->width /
|
||||
gimp_tile_width () + 1));
|
||||
rcm (Current.drawable);
|
||||
color_rotate (Current.drawable);
|
||||
gimp_displays_flush ();
|
||||
}
|
||||
else
|
||||
|
@ -164,11 +164,11 @@ run (const gchar *name,
|
|||
/* Rotate colors of a single row */
|
||||
|
||||
static void
|
||||
rcm_row (const guchar *src_row,
|
||||
guchar *dest_row,
|
||||
gint row,
|
||||
gint row_width,
|
||||
gint bytes)
|
||||
color_rotate_row (const guchar *src_row,
|
||||
guchar *dest_row,
|
||||
gint row,
|
||||
gint row_width,
|
||||
gint bytes)
|
||||
{
|
||||
gint col, bytenum;
|
||||
gdouble H, S, V;
|
||||
|
@ -235,7 +235,7 @@ rcm_row (const guchar *src_row,
|
|||
/* Rotate colors row by row ... */
|
||||
|
||||
static void
|
||||
rcm (GimpDrawable *drawable)
|
||||
color_rotate (GimpDrawable *drawable)
|
||||
{
|
||||
GimpPixelRgn srcPR, destPR;
|
||||
gint width, height;
|
||||
|
@ -260,7 +260,7 @@ rcm (GimpDrawable *drawable)
|
|||
{
|
||||
gimp_pixel_rgn_get_row (&srcPR, src_row, x1, row, (x2 - x1));
|
||||
|
||||
rcm_row (src_row, dest_row, row, (x2 - x1), bytes);
|
||||
color_rotate_row (src_row, dest_row, row, (x2 - x1), bytes);
|
||||
|
||||
gimp_pixel_rgn_set_row (&destPR, dest_row, x1, row, (x2 - x1));
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
STOCK_IMAGES = \
|
||||
rcm-360.png \
|
||||
rcm-a-b.png \
|
||||
rcm-ccw.png \
|
||||
rcm-cw.png
|
||||
color-rotate-360.png \
|
||||
color-rotate-a-b.png \
|
||||
color-rotate-ccw.png \
|
||||
color-rotate-cw.png
|
||||
|
||||
EXTRA_DIST = $(STOCK_IMAGES)
|
||||
|
||||
noinst_DATA = rcm-stock-pixbufs.h
|
||||
noinst_DATA = color-rotate-stock-pixbufs.h
|
||||
CLEANFILES = $(noinst_DATA) stock-icons.list
|
||||
|
||||
stock-icons.list: $(STOCK_IMAGES) Makefile.am
|
||||
|
@ -19,5 +19,5 @@ stock-icons.list: $(STOCK_IMAGES) Makefile.am
|
|||
echo " $(srcdir)/$$image" >> $@; \
|
||||
done )
|
||||
|
||||
$(srcdir)/rcm-stock-pixbufs.h: stock-icons.list
|
||||
$(srcdir)/color-rotate-stock-pixbufs.h: stock-icons.list
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list `cat stock-icons.list` > $(@F)
|
||||
|
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |