Commit 0e42a816 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/script-fu/script-fu-scripts.c allow CSS color keywords to be used

2006-06-08  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/script-fu-scripts.c
	* plug-ins/script-fu/siod-wrapper.c: allow CSS color keywords to
	be used in place of the '(r g b) color notation.

	* plug-ins/script-fu/scripts/test-sphere.scm: documented this new
	feature.

	* plug-ins/script-fu/scripts/*.scm: replaced some colors with
	color names.
parent d42a30e0
2006-06-08 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/siod-wrapper.c: allow CSS color keywords to
be used in place of the '(r g b) color notation.
* plug-ins/script-fu/scripts/test-sphere.scm: documented this new
feature.
* plug-ins/script-fu/scripts/*.scm: replaced some colors with
color names.
2006-06-08 Sven Neumann <sven@gimp.org>
* plug-ins/common/animationplay.c (menu_popup): do not use
......
......@@ -754,14 +754,21 @@ marshall_proc_db_call (LISP a)
break;
case GIMP_PDB_COLOR:
if (!TYPEP (car (a), tc_cons))
success = FALSE;
if (success)
if (TYPEP (car (a), tc_string))
{
if (! gimp_rgb_parse_css (&args[i].data.d_color,
get_c_string (car (a)), -1))
success = FALSE;
gimp_rgb_set_alpha (&args[i].data.d_color, 1.0);
}
else if (TYPEP (car (a), tc_cons))
{
LISP color_list;
guchar r, g, b;
args[i].type = GIMP_PDB_COLOR;
color_list = car (a);
r = CLAMP (get_c_long (car (color_list)), 0, 255);
color_list = cdr (color_list);
......@@ -771,6 +778,10 @@ marshall_proc_db_call (LISP a)
gimp_rgba_set_uchar (&args[i].data.d_color, r, g, b, 255);
}
else
{
success = FALSE;
}
break;
case GIMP_PDB_REGION:
......
......@@ -294,18 +294,30 @@ script_fu_add_script (LISP a)
break;
case SF_COLOR:
if (!TYPEP (car (a), tc_cons))
return my_err ("script-fu-register: color defaults must be a list of 3 integers", NIL);
color_list = car (a);
r = CLAMP (get_c_long (car (color_list)), 0, 255);
color_list = cdr (color_list);
g = CLAMP (get_c_long (car (color_list)), 0, 255);
color_list = cdr (color_list);
b = CLAMP (get_c_long (car (color_list)), 0, 255);
gimp_rgb_set_uchar (&script->arg_defaults[i].sfa_color,
r, g, b);
if (TYPEP (car (a), tc_string))
{
if (! gimp_rgb_parse_css (&script->arg_defaults[i].sfa_color,
get_c_string (car (a)), -1))
return my_err ("script-fu-register: invalid default color name", NIL);
gimp_rgb_set_alpha (&script->arg_defaults[i].sfa_color,
1.0);
}
else if (TYPEP (car (a), tc_cons))
{
color_list = car (a);
r = CLAMP (get_c_long (car (color_list)), 0, 255);
color_list = cdr (color_list);
g = CLAMP (get_c_long (car (color_list)), 0, 255);
color_list = cdr (color_list);
b = CLAMP (get_c_long (car (color_list)), 0, 255);
gimp_rgb_set_uchar (&script->arg_defaults[i].sfa_color,
r, g, b);
}
else
{
return my_err ("script-fu-register: color defaults must be a list of 3 integers or a color name", NIL);
}
script->arg_values[i].sfa_color =
script->arg_defaults[i].sfa_color;
......
......@@ -157,7 +157,7 @@
"07 April, 1998"
""
SF-PATTERN _"Pattern" "Parque #1"
SF-STRING _"Text" "The Gimp"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "RoostHeavy"
SF-ADJUSTMENT _"Outline blur radius" '(5 1 200 1 10 0 1)
......
......@@ -220,9 +220,9 @@
""
SF-ADJUSTMENT _"Block size" '(64 5 1000 1 10 0 1)
SF-ADJUSTMENT _"Thickness" '(12 2 100 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Start blend" '(0 0 0)
SF-COLOR _"End blend" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-COLOR _"Start blend" "black"
SF-COLOR _"End blend" "white"
SF-TOGGLE _"Supersample" TRUE
SF-ADJUSTMENT _"Number of X tiles" '(5 1 1000 1 10 0 1)
SF-ADJUSTMENT _"Number of Y tiles" '(5 1 1000 1 10 0 1))
......
......@@ -156,7 +156,7 @@
_"Up"
_"Down")
SF-COLOR _"Glow color" '(63 252 0)
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Background color" "black"
SF-TOGGLE _"Flatten image" TRUE)
(script-fu-menu-register "script-fu-alien-glow-right-arrow"
......
......@@ -91,7 +91,7 @@
SF-ADJUSTMENT _"Bar length" '(480 5 1500 1 10 0 1)
SF-ADJUSTMENT _"Bar height" '(16 1 100 1 10 0 1)
SF-COLOR _"Glow color" '(63 252 0)
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Background color" "black"
SF-TOGGLE _"Flatten image" TRUE)
(script-fu-menu-register "script-fu-alien-glow-horizontal-ruler"
......
......@@ -101,7 +101,7 @@
""
SF-ADJUSTMENT _"Radius" '(16 1 100 1 10 0 1)
SF-COLOR _"Glow color" '(63 252 0)
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Background color" "black"
SF-TOGGLE _"Flatten image" TRUE)
(script-fu-menu-register "script-fu-alien-glow-bullet"
......
......@@ -146,9 +146,9 @@
SF-STRING _"Text" "Hello world!"
SF-FONT _"Font" "Sans Bold"
SF-ADJUSTMENT _"Font size (pixels)" '(22 2 100 1 1 0 1)
SF-COLOR _"Text color" '(0 0 0)
SF-COLOR _"Text color" "black"
SF-COLOR _"Glow color" '(63 252 0)
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Background color" "black"
SF-ADJUSTMENT _"Padding" '(6 1 100 1 10 0 1)
SF-ADJUSTMENT _"Glow radius" '(10 1 200 1 10 0 1)
SF-TOGGLE _"Flatten image" TRUE)
......
......@@ -160,7 +160,7 @@
"Raphael Quinet"
"1999-2000"
""
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "Blippo"
SF-COLOR _"Glow color" '(0 255 0)
......
......@@ -84,10 +84,10 @@
"Spencer Kimball"
"1996"
""
SF-STRING _"Text" "The Gimp"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "Dragonwick"
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-COLOR _"Text color" '(6 6 206))
(script-fu-menu-register "script-fu-basic1-logo"
......
......@@ -106,7 +106,7 @@
SF-STRING _"Text" "SCRIPT-FU"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "Sans Bold"
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-COLOR _"Text color" '(206 6 50))
(script-fu-menu-register "script-fu-basic2-logo"
......
......@@ -147,7 +147,7 @@
SF-FONT _"Font" "Sans"
SF-COLOR _"Upper-left color" '(0 255 127)
SF-COLOR _"Lower-right color" '(0 127 255)
SF-COLOR _"Text color" '(0 0 0)
SF-COLOR _"Text color" "black"
SF-ADJUSTMENT _"Padding" '(2 1 100 1 10 0 1)
SF-ADJUSTMENT _"Bevel width" '(4 1 100 1 10 0 1)
SF-TOGGLE _"Pressed" FALSE)
......
......@@ -122,7 +122,7 @@
SF-STRING _"Text" "Hello world!"
SF-ADJUSTMENT _"Font size (pixels)" '(32 2 1000 1 10 0 1)
SF-FONT _"Font" "Sans"
SF-COLOR _"Text color" '(0 0 0)
SF-COLOR _"Text color" "black"
SF-PATTERN _"Pattern" "Wood"
SF-TOGGLE _"Pressed" FALSE)
......
......@@ -124,7 +124,7 @@
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Offset (pixels)" '(15 1 100 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-OPTION _"Blend mode" '(_"FG-BG-RGB"
_"FG-BG-HSV"
_"FG-Transparent"
......@@ -174,11 +174,11 @@
"Spencer Kimball"
"1996"
""
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "Crillee"
SF-COLOR _"Text color" '(124 174 255)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-OPTION _"Blend mode" '(_"FG-BG-RGB"
_"FG-BG-HSV"
_"FG-Transparent"
......
......@@ -93,7 +93,7 @@
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Spots density X" '(16 1 16 1 10 0 1)
SF-ADJUSTMENT _"Spots density Y" '(4 1 16 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-bovinated-logo-alpha"
"<Image>/Filters/Alpha to Logo")
......@@ -125,7 +125,7 @@
SF-FONT _"Font" "RoostHeavy"
SF-ADJUSTMENT _"Spots density X" '(16 1 16 1 10 0 1)
SF-ADJUSTMENT _"Spots density Y" '(4 1 16 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-bovinated-logo"
"<Toolbox>/Xtns/Logos")
......@@ -191,7 +191,7 @@
"RGBA GRAYA INDEXEDA"
SF-IMAGE "The image" 0
SF-DRAWABLE "Layer to animate" 0
SF-COLOR _"Glow color" '(255 255 255)
SF-COLOR _"Glow color" "white"
SF-TOGGLE _"Fadeout" FALSE
SF-VALUE _"Fadeout width" "100"
SF-VALUE _"Corona width" "7"
......
......@@ -111,8 +111,8 @@
SF-STRING _"Text" "CHALK"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "Cooper"
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Chalk color" '(255 255 255))
SF-COLOR _"Background color" "black"
SF-COLOR _"Chalk color" "white")
(script-fu-menu-register "script-fu-chalk-logo"
"<Toolbox>/Xtns/Logos")
......@@ -195,7 +195,7 @@
gimp-data-directory
"/scripts/images/beavis.jpg")
SF-COLOR _"Highlight balance" '(211 95 0)
SF-COLOR _"Chrome balance" '(0 0 0)
SF-COLOR _"Chrome balance" "black"
SF-TOGGLE _"Chrome white areas" TRUE)
(script-fu-menu-register "script-fu-sota-chrome-it"
......
......@@ -109,10 +109,10 @@
"Spencer Kimball & Peter Mattis"
"1997"
""
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "Bodoni"
SF-COLOR _"Background color" '(191 191 191))
SF-COLOR _"Background color" "lightgrey")
(script-fu-menu-register "script-fu-chrome-logo"
"<Toolbox>/Xtns/Logos")
......@@ -117,8 +117,8 @@
SF-GRADIENT _"Gradient" "Incandescent"
SF-TOGGLE _"Gradient reverse" FALSE
SF-ADJUSTMENT _"Outline size" '(5 1 100 1 10 0 1)
SF-COLOR _"Outline color" '(255 255 255)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Outline color" "white"
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-comic-logo-alpha"
"<Image>/Filters/Alpha to Logo")
......@@ -155,8 +155,8 @@
SF-GRADIENT _"Gradient" "Incandescent"
SF-TOGGLE _"Gradient reverse" FALSE
SF-ADJUSTMENT _"Outline size" '(5 1 100 1 10 0 1)
SF-COLOR _"Outline color" '(255 255 255)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Outline color" "white"
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-comic-logo"
"<Toolbox>/Xtns/Logos")
......@@ -131,7 +131,7 @@
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Effect size (pixels)" '(100 2 1000 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-GRADIENT _"Gradient" "Horizon 1"
SF-TOGGLE _"Gradient reverse" FALSE)
......@@ -164,7 +164,7 @@
SF-STRING _"Text" "Cool Metal"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "Crillee"
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-GRADIENT _"Gradient" "Horizon 1"
SF-TOGGLE _"Gradient reverse" FALSE)
......
......@@ -170,7 +170,7 @@
SF-ADJUSTMENT _"Offset X" '(8 -4096 4096 1 10 0 1)
SF-ADJUSTMENT _"Offset Y" '(8 -4096 4096 1 10 0 1)
SF-ADJUSTMENT _"Blur radius" '(15 0 1024 1 10 0 1)
SF-COLOR _"Color" '(0 0 0)
SF-COLOR _"Color" "black"
SF-ADJUSTMENT _"Opacity" '(80 0 100 1 10 0 0)
SF-TOGGLE _"Allow resizing" TRUE)
......
......@@ -103,7 +103,7 @@
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Effect size (pixels)" '(100 2 1000 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-frosty-logo-alpha"
"<Image>/Filters/Alpha to Logo")
......@@ -127,10 +127,10 @@
"Spencer Kimball & Ed Mackey"
"1997"
""
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "Becker"
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-frosty-logo"
"<Toolbox>/Xtns/Logos")
......@@ -144,7 +144,7 @@
SF-COLOR _"Text color" '(82 108 159)
SF-COLOR _"Highlight color" '(190 220 250)
SF-COLOR _"Dark color" '(46 74 92)
SF-COLOR _"Shadow color" '(0 0 0)
SF-COLOR _"Shadow color" "black"
SF-TOGGLE _"Autocrop" TRUE
SF-TOGGLE _"Remove background" TRUE
SF-TOGGLE _"Index image" TRUE
......@@ -166,7 +166,7 @@
SF-COLOR _"Text color" '(135 220 220)
SF-COLOR _"Highlight color" '(210 240 245)
SF-COLOR _"Dark color" '(46 74 92)
SF-COLOR _"Shadow color" '(0 0 0)
SF-COLOR _"Shadow color" "black"
SF-TOGGLE _"Autocrop" TRUE
SF-TOGGLE _"Remove background" TRUE
SF-TOGGLE _"Index image" TRUE
......
......@@ -160,8 +160,8 @@
SF-FONT _"Font" "Sans"
SF-ADJUSTMENT _"Font size (pixels)" '(18 2 1000 1 10 0 1)
SF-COLOR _"Text color" '(130 165 235)
SF-COLOR _"Shadow color" '(0 0 0)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Shadow color" "black"
SF-COLOR _"Background color" "white"
SF-TOGGLE _"Remove background" TRUE
SF-TOGGLE _"Index image" TRUE
SF-ADJUSTMENT _"Number of colors" '(15 2 255 1 10 0 1)
......
......@@ -186,7 +186,7 @@
SF-GRADIENT _"Blend gradient (outline)" "Shadows 2"
SF-TOGGLE _"Outline gradient reverse" FALSE
SF-ADJUSTMENT _"Outline size" '(5 0 250 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-TOGGLE _"Use pattern for text instead of gradient" FALSE
SF-PATTERN _"Pattern (text)" "Electric Blue"
SF-TOGGLE _"Use pattern for outline instead of gradient" FALSE
......@@ -253,7 +253,7 @@
SF-GRADIENT _"Blend gradient (outline)" "Shadows 2"
SF-TOGGLE _"Outline gradient reverse" FALSE
SF-ADJUSTMENT _"Outline size" '(5 0 250 1 10 0 1)
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Background color" "white"
SF-TOGGLE _"Use pattern for text instead of gradient" FALSE
SF-PATTERN _"Pattern (text)" "Electric Blue"
SF-TOGGLE _"Use pattern for outline instead of gradient" FALSE
......
......@@ -99,7 +99,7 @@
SF-ADJUSTMENT _"Border size (pixels)" '(22 1 300 1 10 0 1)
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-gradient-bevel-logo-alpha"
"<Image>/Filters/Alpha to Logo")
......@@ -133,7 +133,7 @@
SF-FONT _"Font" "Sans Bold"
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-gradient-bevel-logo"
"<Toolbox>/Xtns/Logos")
......@@ -90,8 +90,8 @@
"Shuji Narazaki"
"1997"
""
SF-STRING _"Text" "The GIMP"
SF-COLOR _"Text color" '(255 0 0)
SF-STRING _"Text" "GIMP"
SF-COLOR _"Text color" "red"
SF-COLOR _"Frame color" '(0 34 255)
SF-FONT _"Font" "Becker"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
......
......@@ -185,7 +185,7 @@
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Effect size (pixels * 5)" '(150 2 1000 1 10 0 1)
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Background color" "black"
SF-COLOR _"Glow color" '(38 211 255)
SF-TOGGLE _"Create shadow" FALSE)
......@@ -217,7 +217,7 @@
SF-STRING _"Text" "NEON"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "Blippo"
SF-COLOR _"Background color" '(0 0 0)
SF-COLOR _"Background color" "black"
SF-COLOR _"Glow color" '(38 211 255)
SF-TOGGLE _"Create shadow" FALSE)
......
......@@ -76,8 +76,8 @@
SF-ADJUSTMENT _"Cell size (pixels)" '(7 1 100 1 10 0 1)
SF-ADJUSTMENT _"Density (%)" '(60 0 100 1 10 0 0)
SF-ADJUSTMENT _"Blur radius" '(0 0 100 1 5 0 0)
SF-COLOR _"Text color" '(0 0 0)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Text color" "black"
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-newsprint-text"
"<Toolbox>/Xtns/Logos")
......@@ -186,12 +186,12 @@
"Arturo Espinosa & Federico Mena Quintero"
"June 1998"
""
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(16 2 100 1 1 0 1)
SF-FONT _"Font" "Sans"
SF-COLOR _"Upper color" '(192 192 0)
SF-COLOR _"Lower color" '(128 108 0)
SF-COLOR _"Text color" '(0 0 0)
SF-COLOR _"Text color" "black"
SF-COLOR _"Upper color (active)" '(255 255 0)
SF-COLOR _"Lower color (active)" '(128 108 0)
SF-COLOR _"Text color (active)" '(0 0 192)
......
......@@ -237,10 +237,10 @@
"RGB GRAY"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-STRING _"Number" "32"
SF-FONT _"Font" "Serif"
SF-COLOR _"Font color" '(255 180 0)
SF-COLOR _"Font color" "darkorange"
SF-TOGGLE _"Work on copy" TRUE)
(script-fu-menu-register "script-fu-slide"
......
......@@ -187,7 +187,7 @@
SF-ADJUSTMENT _"Chrome saturation" '(-80 -100 100 1 10 0 0)
SF-ADJUSTMENT _"Chrome lightness" '(-47 -100 100 1 10 0 0)
SF-ADJUSTMENT _"Chrome factor" '(.75 0 1 .1 .01 2 0)
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
SF-FONT _"Font" "RoostHeavy"
SF-FILENAME _"Environment map"
......@@ -195,7 +195,7 @@
gimp-data-directory
"/scripts/images/beavis.jpg")
SF-COLOR _"Highlight balance" '(211 95 0)
SF-COLOR _"Chrome balance" '(0 0 0))
SF-COLOR _"Chrome balance" "black")
(script-fu-menu-register "script-fu-sota-chrome-logo"
"<Toolbox>/Xtns/Logos")
......@@ -88,8 +88,8 @@
SF-FONT _"Font" "Charter"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-ADJUSTMENT _"Density (%)" '(80 0 100 1 10 0 0)
SF-COLOR _"Text color" '(0 0 0)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Text color" "black"
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-speed-text"
"<Toolbox>/Xtns/Logos")
......@@ -74,8 +74,8 @@
SF-ADJUSTMENT _"Radius (pixels)" '(100 5 500 1 10 0 1)
SF-ADJUSTMENT _"Lighting (degrees)" '(45 0 360 1 10 0 0)
SF-TOGGLE _"Shadow" TRUE
SF-COLOR _"Background color" '(255 255 255)
SF-COLOR _"Sphere color" '(255 0 0))
SF-COLOR _"Background color" "white"
SF-COLOR _"Sphere color" "red")
(script-fu-menu-register "script-fu-sphere"
"<Toolbox>/Xtns/Misc")
......@@ -357,7 +357,7 @@
SF-OPTION _"Color method" '(_"Solid Color"
_"Gradient: loop sawtooth"
_"Gradient: loop triangle")
SF-COLOR _"Color" '(0 0 0)
SF-COLOR _"Color" "black"
SF-GRADIENT _"Gradient" "Deep Sea")
(script-fu-menu-register "script-fu-spyrogimp"
......
......@@ -83,7 +83,7 @@
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Effect size (pixels * 30)" '(150 0 512 1 10 0 1)
SF-COLOR _"Burst color" '(60 196 33)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-starburst-logo-alpha"
"<Image>/Filters/Alpha to Logo")
......@@ -111,7 +111,7 @@
SF-ADJUSTMENT _"Font size (pixels)" '(150 0 512 1 10 0 1)
SF-FONT _"Font" "Blippo"
SF-COLOR _"Burst color" '(60 196 33)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-starburst-logo"
"<Toolbox>/Xtns/Logos")
......@@ -58,7 +58,7 @@
SF-ADJUSTMENT _"Width" '(256 0 1024 1 10 0 1)
SF-ADJUSTMENT _"Whirl amount" '(320 0 360 1 10 0 0)
SF-ADJUSTMENT _"Roughness" '(.5 0 1 .1 .01 2 1)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-swirl-tile"
"<Toolbox>/Xtns/Patterns")
......@@ -105,7 +105,7 @@
SF-ADJUSTMENT _"Edge width" '(2 0 128 1 1 0 0)
SF-TOGGLE _"Edge only" FALSE
SF-COLOR _"Base color" '(0 40 0)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-t-o-p-logo-alpha"
"<Image>/Filters/Alpha to Logo")
......@@ -135,14 +135,14 @@
"Shuji Narazaki"
"1997"
""
SF-STRING _"Text" "The GIMP"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(100 1 1000 1 10 0 1)
SF-FONT _"Font" "Becker"
SF-ADJUSTMENT _"Hit rate" '(0.2 0 1 .01 .01 2 0)
SF-ADJUSTMENT _"Edge width" '(2 0 128 1 1 0 0)
SF-TOGGLE _"Edge only" FALSE
SF-COLOR _"Base color" '(0 40 0)
SF-COLOR _"Background color" '(255 255 255))
SF-COLOR _"Background color" "white")
(script-fu-menu-register "script-fu-t-o-p-logo"
"<Toolbox>/Xtns/Logos")
; This is a slightly modified copy of the sphere script to show and test
; the possibilities of the new Script-Fu API extensions.
; This is a a test script to show and test the possibilities of the
; Script-Fu parameter API.
;
; ----------------------------------------------------------------------
; SF-ADJUSTMENT
......@@ -11,6 +11,17 @@
; SF-ADJUSTMENT "label" '(value, lower, upper, step_inc, page_inc, digits, type)
;
; type is one of: SF-SLIDER(0), SF-SPINNER(1)
;
; ----------------------------------------------------------------------
; SF-COLOR
; creates a color button in the dialog. It accepts either a list of three
; values for the red, green and blue components or a color name in CSS
; notatation
;
; Usage:
; SF-COLOR "label" '(red green blue)
; SF-COLOR "label" "color"
;
; ----------------------------------------------------------------------
; SF-FONT
; creates a font-selection widget in the dialog. It returns a fontname as
......@@ -28,6 +39,7 @@
;
; Usage:
; SF-FONT "label" "fontname"
;
; ----------------------------------------------------------------------
; SF-BRUSH
; is only useful in interactive mode. It will create a widget in the control
......@@ -49,6 +61,7 @@
; paramater would be '("Circle (03)" 1.0 44 0). BTW the widget used
; is generally available in the libgimpui library for any plugin that
; wishes to select a brush.
;
; ----------------------------------------------------------------------
; SF-PATTERN
; Only useful in interactive mode. It will create a widget in the control
......@@ -62,6 +75,7 @@
; The value returned when the script is invoked is a string containing the
; pattern name. If the above selection was not altered the string would
; contain "Maple Leaves"
;
; ----------------------------------------------------------------------
; SF-GRADIENT
; Only useful in interactive mode. It will create a widget in the control
......@@ -74,6 +88,7 @@
; The value returned when the script is invoked is a string containing the
; gradient name. If the above selection was not altered the string would
; contain "Deep Sea"
;