Commit 75306ec3 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/core/gimpdrawable-blend.[ch] app/tools/gimpblendoptions.[ch]

2003-07-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.[ch]
	* app/tools/gimpblendoptions.[ch]
	* app/tools/gimpblendtool.c
	* tools/pdbgen/pdb/misc_tools.pdb
	* plug-ins/script-fu/scripts/: applied a slightly modified patch
	from Alastair M. Robinson that adds dithering to the blend tool
	(bug #97777).

	* app/pdb/misc_tools_cmds.c
	* libgimp/gimpmisctools_pdb.[ch]: regenerated.
parent 5de43849
2003-07-21 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-blend.[ch]
* app/tools/gimpblendoptions.[ch]
* app/tools/gimpblendtool.c
* tools/pdbgen/pdb/misc_tools.pdb
* plug-ins/script-fu/scripts/: applied a slightly modified patch
from Alastair M. Robinson that adds dithering to the blend tool
(bug #97777).
* app/pdb/misc_tools_cmds.c
* libgimp/gimpmisctools_pdb.[ch]: regenerated.
2003-07-21 Sven Neumann <sven@gimp.org>
* app/config/Makefile.am (gimpconfig_libs): added libgimpmath.
......@@ -66,6 +66,8 @@ typedef struct
guchar *row_data;
gint bytes;
gint width;
gboolean dither;
GRand *dither_rand;
} PutPixelData;
......@@ -143,6 +145,7 @@ static void gradient_fill_region (GimpImage *gimage,
gint supersample,
gint max_depth,
gdouble threshold,
gboolean dither,
gdouble sx,
gdouble sy,
gdouble ex,
......@@ -178,6 +181,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
gint supersample,
gint max_depth,
gdouble threshold,
gboolean dither,
gdouble startx,
gdouble starty,
gdouble endx,
......@@ -219,7 +223,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
gradient_fill_region (gimage, drawable,
&bufPR, (x2 - x1), (y2 - y1),
blend_mode, gradient_type, offset, repeat,
supersample, max_depth, threshold,
supersample, max_depth, threshold, dither,
(startx - x1), (starty - y1),
(endx - x1), (endy - y1),
progress_callback, progress_data);
......@@ -798,6 +802,42 @@ gradient_put_pixel (int x,
if (ppd->bytes >= 3)
{
if (ppd->dither)
{
gdouble dither_prob;
gdouble ftmp;
gint itmp;
ftmp = color->r * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (ppd->dither_rand) < dither_prob)
color->r += (1.0 / 255.0);
ftmp = color->g * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (ppd->dither_rand) < dither_prob)
color->g += (1.0 / 255.0);
ftmp = color->b * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if(g_rand_double (ppd->dither_rand) < dither_prob)
color->b += (1.0 / 255.0);
ftmp = color->a * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if(g_rand_double (ppd->dither_rand) < dither_prob)
color->a += (1.0 / 255.0);
if (color->r > 1.0) color->r = 1.0;
if (color->g > 1.0) color->g = 1.0;
if (color->b > 1.0) color->b = 1.0;
if (color->a > 1.0) color->a = 1.0;
}
*data++ = color->r * 255.0;
*data++ = color->g * 255.0;
*data++ = color->b * 255.0;
......@@ -806,15 +846,37 @@ gradient_put_pixel (int x,
else
{
/* Convert to grayscale */
gdouble gray = INTENSITY (color->r, color->g, color->b);
if (ppd->dither)
{
gdouble dither_prob;
gdouble ftmp;
gint itmp;
ftmp = gray * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (ppd->dither_rand) < dither_prob)
gray += (1.0 / 255.0);
ftmp = color->a * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (ppd->dither_rand) < dither_prob)
color->a += (1.0 / 255.0);
if (color->a > 1.0) color->a = 1.0;
}
*data++ = 255.0 * INTENSITY (color->r, color->g, color->b);
*data++ = gray * 255.0;
*data++ = color->a * 255.0;
}
/* Paint whole row if we are on the rightmost pixel */
if (x == (ppd->width - 1))
pixel_region_set_row(ppd->PR, 0, y, ppd->width, ppd->row_data);
pixel_region_set_row (ppd->PR, 0, y, ppd->width, ppd->row_data);
}
static void
......@@ -830,6 +892,7 @@ gradient_fill_region (GimpImage *gimage,
gint supersample,
gint max_depth,
gdouble threshold,
gboolean dither,
gdouble sx,
gdouble sy,
gdouble ex,
......@@ -845,6 +908,7 @@ gradient_fill_region (GimpImage *gimage,
guchar *data;
GimpRGB color;
GimpContext *context;
GRand *dither_rand = NULL;
context = gimp_get_current_context (gimage->gimp);
......@@ -963,17 +1027,21 @@ gradient_fill_region (GimpImage *gimage,
rbd.blend_mode = blend_mode;
rbd.gradient_type = gradient_type;
if (dither)
dither_rand = g_rand_new ();
/* Render the gradient! */
if (supersample)
{
/* Initialize put pixel data */
ppd.PR = PR;
ppd.row_data = g_malloc (width * PR->bytes);
ppd.bytes = PR->bytes;
ppd.width = width;
ppd.PR = PR;
ppd.row_data = g_malloc (width * PR->bytes);
ppd.bytes = PR->bytes;
ppd.width = width;
ppd.dither = dither;
ppd.dither_rand = dither_rand;
/* Render! */
gimp_adaptive_supersample_area (0, 0, (width - 1), (height - 1),
......@@ -989,7 +1057,7 @@ gradient_fill_region (GimpImage *gimage,
else
{
gint max_progress = PR->w * PR->h;
gint progress = 0;
gint progress = 0;
for (pr = pixel_regions_register (1, PR);
pr != NULL;
......@@ -1007,6 +1075,42 @@ gradient_fill_region (GimpImage *gimage,
if (PR->bytes >= 3)
{
if (dither)
{
gdouble dither_prob;
gdouble ftmp;
gint itmp;
ftmp = color.r * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (dither_rand) < dither_prob)
color.r += (1.0 / 255.0);
ftmp = color.g * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (dither_rand) < dither_prob)
color.g += (1.0 / 255.0);
ftmp = color.b * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (dither_rand) < dither_prob)
color.b += (1.0 / 255.0);
ftmp = color.a * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (dither_rand) < dither_prob)
color.a += (1.0 / 255.0);
if (color.r > 1.0) color.r = 1.0;
if (color.g > 1.0) color.g = 1.0;
if (color.b > 1.0) color.b = 1.0;
if (color.a > 1.0) color.a = 1.0;
}
*data++ = color.r * 255.0;
*data++ = color.g * 255.0;
*data++ = color.b * 255.0;
......@@ -1015,8 +1119,30 @@ gradient_fill_region (GimpImage *gimage,
else
{
/* Convert to grayscale */
*data++ = 255.0 * INTENSITY (color.r, color.g, color.b);
gdouble gray = INTENSITY (color.r, color.g, color.b);
if (dither)
{
gdouble dither_prob;
gdouble ftmp;
gint itmp;
ftmp = gray * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (dither_rand) < dither_prob)
gray += (1.0 / 255.0);
ftmp = color.a * 255.0;
itmp = ftmp;
dither_prob = ftmp - itmp;
if (g_rand_double (dither_rand) < dither_prob)
color.a += (1.0 / 255.0);
if (color.a > 1.0) color.a = 1.0;
}
*data++ = gray * 255.0;
*data++ = color.a * 255.0;
}
}
......@@ -1027,4 +1153,7 @@ gradient_fill_region (GimpImage *gimage,
(* progress_callback) (0, max_progress, progress, progress_data);
}
}
if (dither)
g_rand_free (dither_rand);
}
......@@ -30,6 +30,7 @@ void gimp_drawable_blend (GimpDrawable *drawable,
gint supersample,
gint max_depth,
gdouble threshold,
gboolean dither,
gdouble startx,
gdouble starty,
gdouble endx,
......
......@@ -65,6 +65,7 @@ blend_invoker (Gimp *gimp,
gboolean supersample;
gint32 max_depth;
gdouble threshold;
gboolean dither;
gdouble x1;
gdouble y1;
gdouble x2;
......@@ -108,13 +109,15 @@ blend_invoker (Gimp *gimp,
if (supersample && (threshold < 0.0 || threshold > 4.0))
success = FALSE;
x1 = args[10].value.pdb_float;
dither = args[10].value.pdb_int ? TRUE : FALSE;
y1 = args[11].value.pdb_float;
x1 = args[11].value.pdb_float;
x2 = args[12].value.pdb_float;
y1 = args[12].value.pdb_float;
y2 = args[13].value.pdb_float;
x2 = args[13].value.pdb_float;
y2 = args[14].value.pdb_float;
if (success)
{
......@@ -131,7 +134,7 @@ blend_invoker (Gimp *gimp,
opacity / 100.0,
offset, repeat,
supersample, max_depth,
threshold,
threshold, dither,
x1, y1, x2, y2,
NULL, NULL);
}
......@@ -192,6 +195,11 @@ static ProcArg blend_inargs[] =
"threshold",
"Supersampling threshold"
},
{
GIMP_PDB_INT32,
"dither",
"Use dithering to reduce banding (TRUE or FALSE)"
},
{
GIMP_PDB_FLOAT,
"x1",
......@@ -223,7 +231,7 @@ static ProcRecord blend_proc =
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
14,
15,
blend_inargs,
0,
NULL,
......
......@@ -47,7 +47,8 @@ enum
PROP_REPEAT,
PROP_SUPERSAMPLE,
PROP_SUPERSAMPLE_DEPTH,
PROP_SUPERSAMPLE_THRESHOLD
PROP_SUPERSAMPLE_THRESHOLD,
PROP_DITHER
};
......@@ -138,6 +139,11 @@ gimp_blend_options_class_init (GimpBlendOptionsClass *klass)
"supersample-threshold", NULL,
0.0, 4.0, 0.2,
0);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_DITHER,
"dither", NULL,
TRUE,
0);
}
static void
......@@ -177,6 +183,10 @@ gimp_blend_options_set_property (GObject *object,
options->supersample_threshold = g_value_get_double (value);
break;
case PROP_DITHER:
options->dither = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -215,6 +225,10 @@ gimp_blend_options_get_property (GObject *object,
g_value_set_double (value, options->supersample_threshold);
break;
case PROP_DITHER:
g_value_set_boolean (value, options->dither);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -262,6 +276,11 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
G_CALLBACK (blend_options_gradient_type_notify),
menu);
button = gimp_prop_check_button_new (config, "dither",
_("Dithering"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* frame for supersampling options */
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
......
......@@ -42,6 +42,8 @@ struct _GimpBlendOptions
GimpGradientType gradient_type;
GimpRepeatMode repeat;
gboolean dither;
gboolean supersample;
gint supersample_depth;
gdouble supersample_threshold;
......
......@@ -250,6 +250,7 @@ gimp_blend_tool_button_release (GimpTool *tool,
options->supersample,
options->supersample_depth,
options->supersample_threshold,
options->dither,
blend_tool->startx,
blend_tool->starty,
blend_tool->endx,
......
......@@ -53,6 +53,7 @@ Functions giving access to common toolbox tools.
@supersample:
@max_depth:
@threshold:
@dither:
@x1:
@y1:
@x2:
......
......@@ -37,6 +37,7 @@
* @supersample: Do adaptive supersampling.
* @max_depth: Maximum recursion levels for supersampling.
* @threshold: Supersampling threshold.
* @dither: Use dithering to reduce banding.
* @x1: The x coordinate of this blend's starting point.
* @y1: The y coordinate of this blend's starting point.
* @x2: The x coordinate of this blend's ending point.
......@@ -63,6 +64,7 @@ gimp_blend (gint32 drawable_ID,
gboolean supersample,
gint max_depth,
gdouble threshold,
gboolean dither,
gdouble x1,
gdouble y1,
gdouble x2,
......@@ -84,6 +86,7 @@ gimp_blend (gint32 drawable_ID,
GIMP_PDB_INT32, supersample,
GIMP_PDB_INT32, max_depth,
GIMP_PDB_FLOAT, threshold,
GIMP_PDB_INT32, dither,
GIMP_PDB_FLOAT, x1,
GIMP_PDB_FLOAT, y1,
GIMP_PDB_FLOAT, x2,
......
......@@ -39,6 +39,7 @@ gboolean gimp_blend (gint32 drawable_ID,
gboolean supersample,
gint max_depth,
gdouble threshold,
gboolean dither,
gdouble x1,
gdouble y1,
gdouble x2,
......
......@@ -70,7 +70,7 @@
(center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius ADD TRUE FALSE 0)
(center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius SUB TRUE FALSE 0)
(gimp-blend temp-draw FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 FALSE supersample 3 .2 size size (* size 2) (/ size 2) )
(gimp-blend temp-draw FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 FALSE supersample 3 .2 TRUE size size (* size 2) (/ size 2) )
(center-ellipse temp-img size (* size 2) outer-radius outer-radius REPLACE TRUE FALSE 0)
(center-ellipse temp-img size (* size 2) inner-radius inner-radius SUB TRUE FALSE 0)
......@@ -78,7 +78,7 @@
(center-ellipse temp-img (* size 2) size outer-radius outer-radius ADD TRUE FALSE 0)
(center-ellipse temp-img (* size 2) size inner-radius inner-radius SUB TRUE FALSE 0)
;(gimp-edit-fill temp-img temp-draw2 BG-IMAGE-FILL)
(gimp-blend temp-draw2 FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 FALSE supersample 3 .2 size size (* size 2) (* size 2) )
(gimp-blend temp-draw2 FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 FALSE supersample 3 .2 TRUE size size (* size 2) (* size 2) )
(gimp-selection-none temp-img)
......
......@@ -98,7 +98,7 @@
(gimp-palette-set-foreground '(103 103 103))
(gimp-palette-set-background '(0 0 0))
(gimp-blend ruler-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 size size)
(gimp-blend ruler-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 size size)
(gimp-selection-grow img grow-amount)
(gimp-palette-set-foreground glow-color)
......
......@@ -43,7 +43,7 @@
(gimp-rect-select img (/ height 2) (/ height 2) length height REPLACE FALSE 0)
(gimp-palette-set-foreground '(79 79 79))
(gimp-palette-set-background '(0 0 0))
(gimp-blend ruler-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 height height)
(gimp-blend ruler-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 height height)
(gimp-palette-set-foreground glow-color)
(gimp-selection-grow img border)
......
......@@ -52,7 +52,7 @@
; (gimp-rect-select img (/ height 2) (/ height 2) length height REPLACE FALSE 0)
(gimp-palette-set-foreground '(90 90 90))
(gimp-palette-set-background '(0 0 0))
(gimp-blend bullet-layer FG-BG-RGB NORMAL RADIAL 100 0 REPEAT-NONE FALSE 0 0 blend-start blend-start (+ half-radius radius)(+ half-radius radius ))
(gimp-blend bullet-layer FG-BG-RGB NORMAL RADIAL 100 0 REPEAT-NONE FALSE 0 0 TRUE blend-start blend-start (+ half-radius radius)(+ half-radius radius ))
(gimp-palette-set-foreground glow-color)
(gimp-selection-grow img border)
......
......@@ -46,6 +46,7 @@
FALSE
0
0
TRUE
x1
y1
x2
......@@ -100,7 +101,7 @@
(gimp-rect-select img 0 0 img-width img-height REPLACE FALSE 0)
(gimp-palette-set-foreground '(100 100 100))
(gimp-palette-set-background '(0 0 0))
(gimp-blend button-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 img-height img-width)
(gimp-blend button-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 img-height img-width)
(gimp-edit-clear glow-layer)
(gimp-rect-select img (/ glow-radius 4) (/ glow-radius 4) (- img-width (/ glow-radius 2)) (- img-height (/ glow-radius 2)) REPLACE FALSE 0 )
(gimp-palette-set-foreground glow-color)
......
......@@ -30,7 +30,7 @@
(gimp-selection-none img)
(gimp-palette-set-background '(0 0 0))
(gimp-palette-set-foreground '(79 79 79))
(gimp-blend logo-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 1 1)
(gimp-blend logo-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 1 1)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))
......
......@@ -27,7 +27,7 @@
(gimp-edit-fill shadow-layer BG-IMAGE-FILL)
(gimp-selection-none img)
(gimp-palette-set-foreground '(255 255 255))
(gimp-blend logo-layer FG-BG-RGB MULTIPLY RADIAL 100 20 REPEAT-NONE FALSE 0 0 0 0 width height)
(gimp-blend logo-layer FG-BG-RGB MULTIPLY RADIAL 100 20 REPEAT-NONE FALSE 0 0 TRUE 0 0 width height)
(gimp-layer-translate shadow-layer 3 3)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))
......
......@@ -43,7 +43,7 @@
(gimp-edit-fill shadow-layer BG-IMAGE-FILL)
(gimp-selection-none img)
(gimp-palette-set-foreground '(255 255 255))
(gimp-blend logo-layer FG-BG-RGB MULTIPLY RADIAL 100 20 REPEAT-NONE FALSE 0 0 0 0 width height)
(gimp-blend logo-layer FG-BG-RGB MULTIPLY RADIAL 100 20 REPEAT-NONE FALSE 0 0 TRUE 0 0 width height)
(gimp-layer-translate shadow-layer 3 3)
(gimp-layer-translate highlight-layer (- posx 2) (- posy 2))
(gimp-layer-set-name highlight-layer "Highlight")
......
......@@ -49,6 +49,7 @@
FALSE
0
0
TRUE
x1
y1
x2
......@@ -121,6 +122,7 @@
FALSE
0
0
TRUE
0
0
(- img-width 1)
......
......@@ -54,12 +54,12 @@
(gimp-palette-set-background '(0 0 0))
(gimp-edit-fill text-shadow-layer BG-IMAGE-FILL)
(gimp-palette-set-foreground '(255 255 255))
(gimp-blend text-shadow-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 1 1)
(gimp-blend text-shadow-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 1 1)
(gimp-selection-none img)
(gimp-palette-set-foreground blend-fg)
(gimp-palette-set-background blend-bg)
(gimp-gradients-set-gradient blend-gradient)
(gimp-blend blend-layer blend-mode NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 width 0)
(gimp-blend blend-layer blend-mode NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 width 0)
(gimp-layer-translate logo-layer (- b-size-2) (- b-size-2))
(gimp-layer-translate blend-layer (- b-size) (- b-size))
(gimp-layer-translate text-shadow-layer (- ts-size) (- ts-size))
......
......@@ -86,7 +86,7 @@
(begin
; blend with 20% offset to get less transparency in the front
(gimp-blend bl-mask FG-BG-RGB NORMAL-MODE LINEAR 100 20 REPEAT-NONE
FALSE 0 0
FALSE 0 0 TRUE
(+ bl-x-off bl-width) 0 bl-x-off 0)
)
)
......@@ -108,7 +108,7 @@
;--- blend glow color inside the letters
(gimp-palette-set-foreground glow-color)
(gimp-blend bl-layer FG-TRANS NORMAL-MODE LINEAR 100 0 REPEAT-NONE
FALSE 0 0
FALSE 0 0 TRUE
(+ bl-x-off bl-width) 0
(- (+ bl-x-off bl-width) after-glow ) 0)
......@@ -120,7 +120,7 @@
(gimp-selection-feather img corona-width)
(gimp-palette-set-foreground glow-color)
(gimp-blend bl-layer FG-TRANS NORMAL-MODE LINEAR 100 0 REPEAT-NONE
FALSE 0 0
FALSE 0 0 TRUE
(- (+ bl-x-off bl-width) corona-width) 0
(- (+ bl-x-off bl-width) after-glow ) 0)
))
......
......@@ -54,7 +54,7 @@
(gimp-gradients-set-gradient "Coffee")
(gimp-blend theStain CUSTOM NORMAL SHAPEBURST-DIMPLED
100 0 REPEAT-NONE FALSE 0 0 0 0 0 0)
100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 0 0)
(gimp-layer-set-offsets theStain
(- (rand theWidth) (/ theSize 2))
(- (rand theHeight) (/ theSize 2)) theSize))
......
......@@ -71,7 +71,7 @@
(gimp-gradients-set-gradient gradient)
(gimp-layer-set-preserve-trans logo-layer TRUE)
(gimp-selection-all img)
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 (* height 0.33333) 0 (* height 0.83333))
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 (* height 0.33333) 0 (* height 0.83333))
(plug-in-noisify 1 img logo-layer 0 0.20 0.20 0.20 0.20)
(gimp-selection-none img)
(gimp-layer-set-preserve-trans logo-layer FALSE)
......
......@@ -44,7 +44,7 @@
(gimp-edit-fill shadow-layer BG-IMAGE-FILL)
(gimp-gradients-set-gradient gradient)
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 0 (+ height 5))
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 0 (+ height 5))
(gimp-rect-select img 0 (- (/ height 2) feather) img-width (* 2 feather) REPLACE 0 0)
(plug-in-gauss-iir 1 img logo-layer smear TRUE TRUE)
(gimp-selection-none img)
......@@ -89,7 +89,7 @@
(gimp-palette-set-foreground '(255 255 255))
(gimp-palette-set-background '(0 0 0))
(gimp-blend layer-mask FG-BG-RGB NORMAL LINEAR 100 0 REPEAT-NONE
FALSE 0 0 0 (- (/ height 2)) 0 height)
FALSE 0 0 TRUE 0 (- (/ height 2)) 0 height)
(gimp-image-remove-channel img channel)
......
......@@ -77,7 +77,7 @@
(if (= use-pattern-text FALSE)
(begin
(gimp-gradients-set-gradient blend-gradient-text)
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 0 (+ height 5))))
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 0 (+ height 5))))
(gimp-selection-none img)
......@@ -98,7 +98,7 @@
(if (= use-pattern-outline FALSE)
(begin
(gimp-gradients-set-gradient blend-gradient-outline)
(gimp-blend grow-me CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 0 (+ height 5))))
(gimp-blend grow-me CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 0 (+ height 5))))
(gimp-selection-none img)
......
......@@ -57,7 +57,7 @@
(gimp-palette-set-foreground '(255 255 255))
(gimp-layer-set-preserve-trans logo-layer TRUE)
(gimp-selection-all img)
(gimp-blend logo-layer FG-BG-RGB NORMAL RADIAL 95 0 REPEAT-NONE FALSE 0 0 indentX indentY indentX (- height indentY))
(gimp-blend logo-layer FG-BG-RGB NORMAL RADIAL 95 0 REPEAT-NONE FALSE 0 0 TRUE indentX indentY indentX (- height indentY))
(gimp-selection-none img)
(gimp-layer-set-preserve-trans logo-layer FALSE)
(plug-in-bump-map 1 img logo-layer blur-layer 115 bevel-height 5 0 0 0 15 TRUE FALSE 0)
......
......@@ -44,7 +44,7 @@
; Render gradient
(gimp-blend drawable CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 (- width 1) 0)
(gimp-blend drawable CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 TRUE 0 0 (- width 1) 0)
; Terminate
......
......@@ -144,6 +144,7 @@
FALSE
0
0
TRUE
0
0
0
......
......@@ -46,7 +46,7 @@
(let ((theMask (car(gimp-layer-create-mask thinLayer 0))))
(gimp-image-add-layer-mask theImage thinLayer theMask)
(gimp-blend theMask FG-BG-RGB NORMAL LINEAR 100
0 REPEAT-TRIANGULAR FALSE 0 0 0 0 0 (/ theHeight 2) )
0 REPEAT-TRIANGULAR FALSE 0 0 TRUE 0 0 0 (/ theHeight 2) )
)
(set! theLayer (car(gimp-image-flatten theImage)))
))
...