diff --git a/plug-ins/perl/MANIFEST b/plug-ins/perl/MANIFEST
index 193d9251e5..8616807b86 100644
--- a/plug-ins/perl/MANIFEST
+++ b/plug-ins/perl/MANIFEST
@@ -119,6 +119,7 @@ examples/map_to_gradient
examples/fire
examples/povray
examples/avi
+examples/layerfuncs
pxgettext
po/gimp-perl.pot
po/de.po
diff --git a/plug-ins/perl/Makefile.PL b/plug-ins/perl/Makefile.PL
index 4e8582de88..c36cca5683 100644
--- a/plug-ins/perl/Makefile.PL
+++ b/plug-ins/perl/Makefile.PL
@@ -13,7 +13,7 @@ $|=1;
repdup centerguide stampify goldenmean triangle billboard mirrorsplit
oneliners randomart1 pixelmap glowing_steel frame_reshuffle frame_filter
logulator miff gimpmagick guide_remove guides_to_selection burst map_to_gradient
- fire povray avi
+ fire povray avi layerfuncs
);
if ($ARGV[0] ne "--writemakefile") {
diff --git a/plug-ins/perl/examples/alpha2color.pl b/plug-ins/perl/examples/alpha2color.pl
index b77e11f720..6933faa97d 100755
--- a/plug-ins/perl/examples/alpha2color.pl
+++ b/plug-ins/perl/examples/alpha2color.pl
@@ -1,114 +1,63 @@
-#!/usr/bin/perl
+
+
-use Gimp qw(:auto __);
-use Gimp::Fu;
+
-# Revision History
-# v0.02 - fixed up @color (should be $color) and undef; (should be return();)
+
+WWWOFFLE - Will Get http://www.gimp.org/%7Esjburges/alpha2color.pl
+
-sub save_layers_state ($) {
- $img = shift;
- my @layers = $img->get_layers;
- $i = 0;
- foreach $lay (@layers) {
- if ($lay->get_visible){
- $arr[$i] = 1;
- }
- else {
- $arr[$i] = 0;
- }
- $i++;
- }
- return @arr;
- }
+
-sub restore_layers_state($@) {
- $img = shift;
- @arr = @_;
- my @layers = $img->get_layers;
- $i = 0;
- foreach $lay (@layers) {
- $lay->set_visible($arr[$i]);
- $i++;
- }
- }
+
+
+WWWOFFLE - World Wide Web Offline Explorer
+
+
-sub alpha2col {
- my ($img, $drawable, $color) = @_;
+
- my $oldcolor = gimp_palette_get_background();
+WWWOFFLE Request Recorded
- my @layers = gimp_image_get_layers($img);
+
+Your request for URL
+
+http://www.gimp.org/%7Esjburges/alpha2color.pl
+
+has been recorded for download.
+
-# if there's not enough layers, abort.
- if ($#layers < 0) {
- gimp_message("You need at least 1 layer to perform alpha2color!");
- print "Only ", scalar(@layers), " layers found!(", $layers[0],")\n";
- return 0;
- }
+
- $img->selection_all;
- $target_layer->edit_fill;
- $img->selection_none;
+
+[Cancel|Refresh:Options|Monitor|Index]
+
- $foreground = gimp_image_merge_visible_layers($img,0);
+
- restore_layers_state($img, @layer_visibilities);
+
- gimp_palette_set_background($oldcolor);
- gimp_displays_flush();
- return();
- }
+
+WWWOFFLE - [Welcome Page|FAQ] - WWWOFFLE
+
-register
- "plug_in_alpha2color",
- "Alpha 2 Color",
- "Change the current alpha to a selected color.",
- "Seth Burgess",
- "Seth Burgess",
- "2-15-98",
- __"/Image/Colors/Alpha2Color",
- "RGBA",
- [
- [PF_COLOR, "color", "Color for current alpha", [127,127,127]]
- ],
- \&alpha2col;
+
-exit main;
+
+
diff --git a/plug-ins/perl/examples/billboard b/plug-ins/perl/examples/billboard
index 535cd9d2d3..639be3fc73 100755
--- a/plug-ins/perl/examples/billboard
+++ b/plug-ins/perl/examples/billboard
@@ -1,171 +1,63 @@
-#!/usr/bin/perl -w
+
+
-# This one's all mine. Well, its GPL/Artisitic but I"m the author and creator. # I think you need gimp 1.1 or better for this - if you don't, please let
-# me know
+
-# Gimp::set_trace(TRACE_ALL);
+
+WWWOFFLE - Will Get http://www.gimp.org/%7Esjburges/billboard
+
-sub saw { # a sawtooth function on PI
- ($val) = @_;
- if ($val < 3.14159/2.0) {
- return ($val/3.14159) ;
- }
- elsif ($val < 3.14159) {
- return (-1+$val/3.14159);
- }
- elsif ($val < 3.14159+3.14159/2.0) {
- return ($val/3.14159) ;
- }
- else {
- return (-1+$val/3.14159);
- }
- }
+
-sub spin_layer { # the function for actually spinning the layer
- my ($img, $spin, $dest, $numframes, $prp, $blinds) = @_;
- # Now lets spin it!
- $stepsize = 3.14159/$numframes; # in radians
- for ($i=0; $i<=3.14159; $i+=$stepsize) {
- Gimp->progress_update ($i/3.14159);
- # create a new layer for spinning
- $framelay = ($i < 3.14159/2.0) ? $spin->copy(1) : $dest->copy(1);
- $img->add_layer($framelay, 0);
- # spin it a step
- # Here I need to make the proper selection, repeatedly if necessary
- $blindheight = $img->height/$blinds;
- for ($j=0; $j<$blinds; $j++) {
- # select a section
- $img->rect_select(0, $j*$blindheight, $img->width, $blindheight, 2, 0, 0.13);
- @x = $img->selection_bounds();
- # x[1],x[2] x[3],x[2]
- # x[1],x[4] x[3],x[4]
- $floater = $framelay->perspective(1,
- $x[1]+saw($i)*$prp*$framelay->width,$x[2]+$blindheight *sin($i)/2,
- $x[3]-saw($i)*$prp*$framelay->width,$x[2]+$blindheight *sin($i)/2,
- $x[1]-saw($i)*$prp*$framelay->width,$x[4]-$blindheight *sin($i)/2,
- $x[3]+saw($i)*$prp*$framelay->width,$x[4]-$blindheight *sin($i)/2);
- $floater->floating_sel_anchor;
- } # end for ($j=0;...
+
- # I need to create another layer beind this spun one now
- $backlayer = $framelay->layer_copy(0);
- $img->add_layer($backlayer, 1);
- $backlayer->fill(1); # BG-IMAGE-FILL
- }
- for ($i=0; $i<$numframes; $i++) {
- @all_layers = $img->get_layers();
- $img->set_visible($all_layers[$i],$all_layers[$i+1]);
- $img->merge_visible_layers(0);
- }
- @all_layers = $img->get_layers();
- $destfram = $all_layers[$numframes]->copy(0);
- $img->add_layer($destfram,0);
+
+WWWOFFLE - World Wide Web Offline Explorer
+
- # clean up my temporary layers
- $img->remove_layer($all_layers[$numframes]);
- $img->remove_layer($all_layers[$numframes+1]);
-}
+
-register "billboard",
- "Billboard",
- "Take one image. Spin it about the multiple axes, and end up with another image. I made it for easy web buttons, mostly because somebody suggested to me.",
- "Seth Burgess",
- "Seth Burgess ",
- "1.3",
- __"/Xtns/Animation/Billboard",
- "*",
- [
- [PF_DRAWABLE, "source", "What drawable to spin from?"],
- [PF_DRAWABLE, "destination","What drawable to spin to?"],
- [PF_INT8, "frames", "How many frames to use?", 16],
- [PF_COLOR, "background", "What color to use for background if not transparent", [0,0,0]],
- [PF_SLIDER, "perspective", "How much perspective effect to get", 40, [0,255,5]],
- [PF_TOGGLE, "spin_back", "Also spin back?" , 0],
- [PF_TOGGLE, "convert_indexed", "Convert to indexed?", 1],
- [PF_SPINNER, "billboard_slats", "Number of shades", 3, [1,50,1]],
- ],
- [],
- ['gimp-1.1'],
- sub {
- my($src,$dest,$frames,$color,$psp,$spinback,$indexed, $shadenum) =@_;
- $maxwide = ($src->width > $dest->width) ? $src->width : $dest->width;
- $maxhigh = ($src->height > $dest->height) ? $src->height: $dest->height;
- $img = gimp_image_new($maxwide, $maxhigh, RGB);
+
+WWWOFFLE Request Recorded
- $tmpimglayer = $img->add_new_layer(0,3,1);
- $img->display_new;
- Gimp->progress_init("Billboard...",-1);
- $oldbackground = gimp_palette_get_background();
- Palette->set_background($color);
- $src->edit_copy();
- $spinlayer = $tmpimglayer->edit_paste(1);
- $spinlayer->floating_sel_to_layer();
+
+Your request for URL
+
+http://www.gimp.org/%7Esjburges/billboard
+
+has been recorded for download.
+
- $dest->edit_copy();
- $destlayer = $tmpimglayer->edit_paste(1);
- $destlayer->floating_sel_to_layer();
+
- # need an even number of frames for spinback
- if ($frames%2 && $spinback) {
- $frames++;
- gimp_message("An even number of frames is needed for spin back.\nAdjusted frames up to $frames");
- }
+
+[Cancel|Refresh:Options|Monitor|Index]
+
- spin_layer($img, $spinlayer, $destlayer, $spinback ? $frames/2 : $frames-1, $psp, $shadenum);
- $img->set_visible($img->add_new_layer(1),($img->get_layers)[0]);
- $img->merge_visible_layers(0);
-
- if ($spinback) {
- @layerlist = $img->get_layers();
- $img->add_layer($layerlist[$frames/2]->copy(0),0);
- @layerlist = $img->get_layers();
- spin_layer($img, $layerlist[1], $layerlist[0], $frames/2, $psp, $shadenum);
- $img->remove_layer(($img->get_layers)[0]);
- }
-
- # unhide and name layers
- @all_layers = $img->get_layers;
- $img->set_visible(@all_layers);
- for ($i=1; $i<=$frames ; $i++) {
- $all_layers[$i-1]->set_name("Spin Layer $i (50ms)");
- }
- $all_layers[$frames-1]->set_name("Spin Layer SRC (250ms)");
-
- if ($spinback) {
- $all_layers[$frames/2-1]->set_name("Spin Layer DEST (250ms)");
- }
- else { $all_layers[0]->set_name("Spin Layer DEST (250ms)")}
-
+
- # indexed conversion wants a display for some reason
- if ($indexed) { $img->convert_indexed(1,255); }
+
- Palette->set_background($oldbackground);
- gimp_displays_flush();
- return();
-};
+
+WWWOFFLE - [Welcome Page|FAQ] - WWWOFFLE
+
-exit main;
+
+
+
+
diff --git a/plug-ins/perl/examples/burst b/plug-ins/perl/examples/burst
index ab1048d577..d4a4edbc2b 100755
--- a/plug-ins/perl/examples/burst
+++ b/plug-ins/perl/examples/burst
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+ if 0; # not running under some shell
# (original release)
#
use Gimp;
@@ -27,7 +29,7 @@ the inside and the outside of the burst. \n",
"Seth Burgess",
"Seth Burgess ",
"1999-07-31",
- __"/Filters/Misc/Burst",
+ "/Filters/Misc/Burst",
"*",
[
[PF_RADIO, "shape", "Shape To Burst Into", 0, [Rectangle => 1, Ellipse=> 0]],
diff --git a/plug-ins/perl/examples/feedback.pl b/plug-ins/perl/examples/feedback.pl
index d654aa1a56..716665ed58 100755
--- a/plug-ins/perl/examples/feedback.pl
+++ b/plug-ins/perl/examples/feedback.pl
@@ -1,41 +1,63 @@
-#!/usr/bin/perl
+
+
-# Revision 1.0: Released it
-# 1.1: Marc Lehman added undo capability!
-# 1.2: Added my email, and put it in "Noise" where it belongs
-#
+
- eval { $img->undo_push_group_start };
+
+WWWOFFLE - Will Get http://www.gimp.org/%7Esjburges/feedback.pl
+
- for (; $repeat>0; $repeat--) {
- $drawable = $img->flatten;
- $copylayer = $drawable->copy(1);
- $img->add_layer($copylayer,0);
- $copylayer->scale($img->width - $offset, $img->height - $offset, 0);
- }
- $img->flatten;
- eval { $img->undo_push_group_end };
- return();
-};
+
-exit main;
+
+
+WWWOFFLE - World Wide Web Offline Explorer
+
+
+
+
+
+
+WWWOFFLE Request Recorded
+
+
+Your request for URL
+
+http://www.gimp.org/%7Esjburges/feedback.pl
+
+has been recorded for download.
+
+
+
+
+
+[Cancel|Refresh:Options|Monitor|Index]
+
+
+
+
+
+
+
+WWWOFFLE - [Welcome Page|FAQ] - WWWOFFLE
+
+
+
+
+
+
+
diff --git a/plug-ins/perl/examples/fit-text b/plug-ins/perl/examples/fit-text
index 322785f7b2..ab8fd280ce 100755
--- a/plug-ins/perl/examples/fit-text
+++ b/plug-ins/perl/examples/fit-text
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+ if 0; # not running under some shell
#
# This is adrian and xachs idea - take a rectangluar selection, and select
# font type and string. Then fill it with whatever size is needed.
@@ -39,7 +41,7 @@ register "fit_text",
"Seth Burgess",
"Seth Burgess ",
"1999-03-21",
- __"/Filters/Render/Fit Text",
+ "/Filters/Render/Fit Text",
"*",
[
[PF_FONT, "font", "What font type to use - size will be ignored", $defaultfont],
diff --git a/plug-ins/perl/examples/glowing_steel b/plug-ins/perl/examples/glowing_steel
index cdce7170ce..473df04856 100755
--- a/plug-ins/perl/examples/glowing_steel
+++ b/plug-ins/perl/examples/glowing_steel
@@ -96,7 +96,7 @@ sub perl_fu_add_glow {
gimp_undo_push_group_start($image);
- if (!gimp_drawable_layer($drawable)) {
+ if (!gimp_drawable_is_layer($drawable)) {
die("add_glow: Only layers can have glow added");
}
@@ -167,11 +167,12 @@ sub perl_fu_brushed_metal {
$y1-=$length;
$x2+=$length;
$y2+=$length;
- my $width = $x2-$x1;
- my $height = $y2-$y1;
+ my $width = abs($x2-$x1);
+ my $height = abs($y2-$y1);
my $templ = gimp_layer_new($image, $width, $height, RGBA_IMAGE, "Temp",
100, NORMAL_MODE);
gimp_image_add_layer($image, $templ, 0);
+ gimp_layer_set_offsets($templ, $x1+$length, $y1+$length);
my $target_select = gimp_selection_save($image);
gimp_selection_none($image);
@@ -206,7 +207,7 @@ sub perl_fu_highlight_edges {
gimp_undo_push_group_start($image);
- if (!gimp_drawable_layer($drawable)) {
+ if (!gimp_drawable_is_layer($drawable)) {
gimp_message("highlight_edges: Only layers can be highlighted!");
return;
}
diff --git a/plug-ins/perl/examples/guide_remove b/plug-ins/perl/examples/guide_remove
index 0e69a54f51..8d7b5cfeea 100755
--- a/plug-ins/perl/examples/guide_remove
+++ b/plug-ins/perl/examples/guide_remove
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+ if 0; # not running under some shell
#
# 11/7/99
# Guides are pretty good, but I want to be able to remove them.
@@ -17,7 +19,7 @@ register "guide_remove",
"Brendon Humphrey",
"Brendon Humphrey ",
"1999-07-20",
- __"/Guides/Remove Guides",
+ "/Guides/Remove Guides",
"*",
[],
[],
@@ -31,15 +33,15 @@ register "guide_remove",
$i=$img->find_next_guide(0);
while ($i != 0) {
$img->delete_guide($i);
- $i=$img->find_next_guide($i);
+ $i=$img->find_next_guide(0);
}
#
# Refresh the display (probably not good, works for me!)
#
- #$img->selection_all();
- #$img->selection_none();
+ $img->selection_all();
+ $img->selection_none();
- ();
+ return();
};
exit main;
diff --git a/plug-ins/perl/examples/guidegrid b/plug-ins/perl/examples/guidegrid
index a0012e7d7c..e595f3de75 100755
--- a/plug-ins/perl/examples/guidegrid
+++ b/plug-ins/perl/examples/guidegrid
@@ -24,7 +24,7 @@ register "guide_grid",
"Seth Burgess",
"Seth Burgess ",
"1999-03-20",
- __"/Guides/Guide Grid",
+ "/Guides/Guide Grid",
"*",
[
[PF_SPINNER, "x_spacing", "How far to space grid horizontally", 24, [1,1000,1]],
diff --git a/plug-ins/perl/examples/innerbevel b/plug-ins/perl/examples/innerbevel
index 4628604075..7d38cfcea6 100755
--- a/plug-ins/perl/examples/innerbevel
+++ b/plug-ins/perl/examples/innerbevel
@@ -7,14 +7,14 @@
# working btw). You can follow step by step with the website at
# http://tigert.gimp.org/gimp/tutorials/beveled_text/
-use Gimp qw(:auto __);
+use Gimp;
use Gimp::Fu;
use Gimp::Util;
$defaultcolor1 = [124,10,18];
$defaultcolor2 = [200,19,27];
-$path = __"/Xtns/Render/Logos/Inner Bevel";
+$path = "/Xtns/Render/Logos/Inner Bevel";
$shortdesc = "Perform an inner bevel on text";
$longdesc = "This uses tigert's inner bevel method on text, which can be found with his other excellent tutorials at http://tigert.gimp.org/";
$date = "1999-03-23";
diff --git a/plug-ins/perl/examples/layerfuncs b/plug-ins/perl/examples/layerfuncs
new file mode 100755
index 0000000000..28c41a5184
--- /dev/null
+++ b/plug-ins/perl/examples/layerfuncs
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+#
+use Gimp;
+use Gimp::Fu;
+use Gimp::Util;
+# Gimp::set_trace(TRACE_ALL);
+
+# These are a couple of one-liners that you might find handy. Both should
+# be undoable w/o any special magick, and work with any gimp.
+
+register "layer_to_image_size", "Layer2ImageSize", "Expands layer to image size",
+ "Seth Burgess", "Seth Burgess ", "1.0",
+ "/Layers/Layer to Image Size", "RGB*, GRAY*", [ ], sub {
+ ($img, $layer) = @_;
+ $layer->resize($img->width, $img->height, $layer->offsets);
+ return();
+};
+
+register "center_layer", "Center Layer",
+ "Centers the current layer on the image",
+ "Seth Burgess", "Seth Burgess ",
+ "1.0", "/Layers/Center Layer", "RGB*, GRAY*", [], sub {
+ ($img, $layer) = @_;
+ $layer->set_offsets(($img->width - $layer->width )/2,
+ ($img->height - $layer->height)/2);
+ return();
+};
+
+exit main;
diff --git a/plug-ins/perl/examples/perlotine b/plug-ins/perl/examples/perlotine
index c98beed4a0..64b4d8c660 100755
--- a/plug-ins/perl/examples/perlotine
+++ b/plug-ins/perl/examples/perlotine
@@ -28,7 +28,7 @@ sub get_vguides {
$i=0;
my @vguides;
while ($i=$img->find_next_guide($i)) {
- if ($img->get_guide_orientation($i) == &Gimp::VERTICAL){
+ if ($img->get_guide_orientation($i) == &Gimp::VERTICAL_GUIDE){
$keyval = sprintf("%4d", $img->get_guide_position($i));
$vkeys{$keyval} = $i;
}
@@ -49,7 +49,7 @@ sub get_hguides {
$i=0;
my @hguides;
while ($i=$img->find_next_guide($i)) {
- if ($img->get_guide_orientation($i) == &Gimp::HORIZONTAL){
+ if ($img->get_guide_orientation($i) == &Gimp::HORIZONTAL_GUIDE){
$keyval = sprintf("%4d", $img->get_guide_position($i));
$hkeys{$keyval} = $i;
}
@@ -133,8 +133,8 @@ register "perlotine",
"Add guides to an image. Then run this. It will cut along the guides, and give you the html to reassemble the resulting images.",
"Seth Burgess",
"Seth Burgess ",
- "1999-09-11",
- __"/Guides/Perl-o-tine",
+ "1999-03-19",
+ "/Guides/Perl-o-tine",
"*",
[
[PF_STRING, "save_path", "The path to export the HTML to",$ENV{HOME}],
diff --git a/plug-ins/perl/examples/prep4gif.pl b/plug-ins/perl/examples/prep4gif.pl
index 5bd0965474..d04ae7829a 100755
--- a/plug-ins/perl/examples/prep4gif.pl
+++ b/plug-ins/perl/examples/prep4gif.pl
@@ -1,110 +1,63 @@
-#!/usr/bin/perl
+
+
-use Gimp;
-use Gimp::Fu;
+
-sub prep {
- my ($img, $drawable, $threshold, $growth, $index, $dither, $colors) = @_;
+
+WWWOFFLE - Will Get http://www.gimp.org/%7Esjburges/prep4gif.pl
+
-# Duplicate this image, and work on the duplicate for the rest of the
-# procedure.
- my $out = gimp_channel_ops_duplicate($img);
+
-# @layers is the ordered list, from top to bottom, of all layers in the
-# duplicated image. To find length of the list, use $#layers
- my @layers = gimp_image_get_layers($out);
+
-# if there's not enough layers, abort.
- if ($#layers <= 0) {
- gimp_message("You need at least 2 layers to perform prep4gif");
- print "Only ", scalar(@layers), " layers found!(", $layers[0],")\n";
- return;
- }
+
+WWWOFFLE - World Wide Web Offline Explorer
+
-# Show the image early - this makes debugging a breeze
- my $newdisplay = gimp_display_new($out);
+
-# Hide the bottom layer, so it doesn't get into the merge visible later.
+
- my $bottomlayer = $layers[$#layers];
- gimp_layer_set_visible($bottomlayer, 0);
- gimp_layer_add_alpha($bottomlayer);
+WWWOFFLE Request Recorded
-# NOTE TO PERL NEWBIES - 'my' variables should be declared in their outermost
-# scope - if defined inside the if statement, will disappear to program.
+
+Your request for URL
+
+http://www.gimp.org/%7Esjburges/prep4gif.pl
+
+has been recorded for download.
+
- my $foreground;
+
-# Transfer layer mask to selection, and grow the selection
- gimp_selection_layer_alpha($foreground);
- gimp_selection_grow($out,$growth);
+
+[Cancel|Refresh:Options|Monitor|Index]
+
-# Apply this selection to the background
- gimp_layer_set_visible($bottomlayer, 1);
- gimp_image_set_active_layer($out, $bottomlayer);
- gimp_selection_invert($out);
- gimp_edit_cut($bottomlayer);
+
-# Clean up after yourself
- gimp_image_remove_layer_mask($out, $foreground, 1);
- my $outlayer = gimp_image_merge_visible_layers($out,0);
+
-# Convert to indexed
- if ($index) {
- gimp_convert_indexed($out,$dither,$colors);
- }
+
+WWWOFFLE - [Welcome Page|FAQ] - WWWOFFLE
+
-# Show all the changes.
- gimp_displays_flush();
+
- ();
- }
-
-register
- "prep4gif",
- "Prep for gif",
- "Make the image a small-cut-out of the intended background, so your transparent text doesn't look blocky.",
- "Seth Burgess",
- "Seth Burgess ",
- "2-15-98",
- __"/Filters/Misc/Prepare for GIF",
- "RGB*",
- [
- [PF_INT32, "lower_threshold", "Lower Alpha Threshold", 64],
- [PF_INT32, "growth", "How Much growth for safety ",1],
- [PF_TOGGLE, "convert_to_indexed", "Convert Image to indexed", 0],
- [PF_TOGGLE, "dither", "Floyd-Steinberg Dithering?", 1],
- [PF_INT32, "colors", "Colors to quantize to", "255"],
- ],
- \&prep;
-
-exit main;
+
+
diff --git a/plug-ins/perl/examples/randomblends b/plug-ins/perl/examples/randomblends
index 3c1640385f..14e821c62a 100755
--- a/plug-ins/perl/examples/randomblends
+++ b/plug-ins/perl/examples/randomblends
@@ -19,8 +19,8 @@ register "random_blends",
"A random approach to art. Just try it. It might be good.",
"Seth Burgess",
"Seth Burgess ",
- "1999-03-18a",
- __"/Filters/Render/Random Blends",
+ "1999-03-18",
+ "/Filters/Render/Random Blends",
"RGB*, GRAY*",
[
[PF_SPINNER, "number", "How many gradients to apply", 7, [1,255,1]],
@@ -31,13 +31,13 @@ register "random_blends",
my($img,$layer,$numgradients) =@_;
eval { $img->undo_push_group_start }; # undo is broked for this one.
# add this to the get_state (after its working?)
- $oldgradient = Gimp->gradients_get_active();
+ $oldgradient = gimp_gradients_get_active();
($sel,$x1,$y1,$x2,$y2) = $img->gimp_selection_bounds;
srand();
- @gradientlist = Gimp->gradients_get_list();
+ @gradientlist = gimp_gradients_get_list();
for ($i=0; $i<=$numgradients; $i++) {
- Gimp->gradients_set_active(@gradientlist[randint($#gradientlist)]);
+ gimp_gradients_set_active(@gradientlist[randint($#gradientlist)]);
$layer->gimp_blend(CUSTOM,
6, # DIFFERENCE
# I'd really like to alternate how many arguments in gradient type depending
@@ -54,7 +54,7 @@ register "random_blends",
);
}
eval { $img->undo_push_group_end };
- Gimp->gradients_set_active($oldgradient);
+ gimp_gradients_set_active($oldgradient);
return();
};
exit main;
diff --git a/plug-ins/perl/examples/roundrectsel b/plug-ins/perl/examples/roundrectsel
index aef817c514..90805fe1aa 100755
--- a/plug-ins/perl/examples/roundrectsel
+++ b/plug-ins/perl/examples/roundrectsel
@@ -15,7 +15,7 @@ register "round_rect_sel",
"Seth Burgess",
"Seth Burgess ",
"1999-03-25",
- __"/Select/Round Rectangular Selection",
+ "/Select/Round Rectangular Selection",
"*",
[
[PF_SPINNER, "x_rounding", "How much to round in the horizontal, in pixels", 16, [1,1000,1]],
diff --git a/plug-ins/perl/examples/sethspin.pl b/plug-ins/perl/examples/sethspin.pl
index ab21ef9763..5f41c0c885 100755
--- a/plug-ins/perl/examples/sethspin.pl
+++ b/plug-ins/perl/examples/sethspin.pl
@@ -82,7 +82,7 @@ register "seth_spin",
"Seth Burgess",
"Seth Burgess ",
"1.3",
- __"/Xtns/Animation/Seth Spin",
+ "/Xtns/Animation/Seth Spin",
"*",
[
[PF_DRAWABLE, "source", "What drawable to spin from?"],
diff --git a/plug-ins/perl/examples/terral_text b/plug-ins/perl/examples/terral_text
index 7ee19555c7..74aa475feb 100644
--- a/plug-ins/perl/examples/terral_text
+++ b/plug-ins/perl/examples/terral_text
@@ -26,7 +26,7 @@
#[terral] input levels of 0, .24, 113 [22:11]
#[terral] --end of script [22:12]
-use Gimp qw(:auto __);
+use Gimp 1.06;
use Gimp::Fu;
use Gimp::Util;
@@ -40,7 +40,7 @@ register
"Seth Burgess",
"Seth Burgess ",
"1999-03-15",
- __"/Filters/Render/Terral Text",
+ "/Filters/Render/Terral Text",
"RGB*,GRAY*",
[
[ PF_RADIO, "solid_noise", "The Texture Type", 0, ["solid noise" => 1, "current picture" => 0]],
diff --git a/plug-ins/perl/examples/windy.pl b/plug-ins/perl/examples/windy.pl
index 0baf27ab7a..0ee13f91d4 100755
--- a/plug-ins/perl/examples/windy.pl
+++ b/plug-ins/perl/examples/windy.pl
@@ -1,65 +1,63 @@
-#!/usr/bin/perl
+
+
-# sent to me by Seth Burgess
-# small changes my Marc Lehmann
+
- my $out = gimp_image_new($xsize,$ysize,0);
- gimp_palette_set_background([128,128,128]);
- my $windlayer = gimp_layer_new($out,$xsize,$ysize,RGB_IMAGE,"Windlayer",100,NORMAL_MODE);
- gimp_drawable_fill($windlayer, 0);
- gimp_image_add_layer($out,$windlayer,0);
- my $windlayercopy = gimp_layer_copy($windlayer, 1);
- gimp_image_add_layer($out,$windlayercopy,0);
- plug_in_noisify($windlayercopy,0,$density/255,
- $density/255,
- $density/255,1);
+
+WWWOFFLE - Will Get http://www.gimp.org/%7Esjburges/windify.pl
+
- plug_in_mblur($windlayercopy,0,15,$angle);
- gimp_layer_set_mode($windlayercopy, 10); # Lighten Only
- gimp_image_merge_visible_layers($out,0);
+
-# many thanks to Dov for this suggestion as a workaround to the
-# gimp_image_merge_visible_layers bug
+
- my $newlay = gimp_image_get_active_layer ($out);
- plug_in_displace($drawable,-$distance*cos($angle*180/3.14159),
- $distance*sin($angle*180/3.14159),
- 1,1, $newlay,$newlay, $wrap);
- gimp_image_remove_layer($out,$newlay);
- gimp_image_delete ($out);
- gimp_palette_set_background($oldbg);
- gimp_displays_flush();
+
+WWWOFFLE - World Wide Web Offline Explorer
+
- undef;
- }
+
-register
- "windify",
- "Add wind to an image",
- "Blow your image all over :)",
- "Seth Burgess",
- "Seth Burgess ",
- "1998-09-14",
- __"/Filters/Distorts/Windify",
- "*",
- [
- [PF_INT32, "angle", "Wind Angle, 0 is left", 120],
- [PF_INT32, "density", "How Much Is Blown",80],
- [PF_VALUE, "distance", "How Far Its Blown",30],
- [PF_TOGGLE, "smear", "Smear on Edges (or Wrap)",0]
- ],
- \&windify;
+
-exit main;
+WWWOFFLE Request Recorded
+
+Your request for URL
+
+http://www.gimp.org/%7Esjburges/windify.pl
+
+has been recorded for download.
+
+
+
+
+
+[Cancel|Refresh:Options|Monitor|Index]
+
+
+
+
+
+
+
+WWWOFFLE - [Welcome Page|FAQ] - WWWOFFLE
+
+
+
+
+
+
+
diff --git a/plug-ins/perl/examples/xachlego.pl b/plug-ins/perl/examples/xachlego.pl
index 3a8971401c..7205128ac2 100755
--- a/plug-ins/perl/examples/xachlego.pl
+++ b/plug-ins/perl/examples/xachlego.pl
@@ -29,7 +29,7 @@
# in a directory more suitable than the lame "Misc"
# Here's the boring start of every script...
-use Gimp qw(:auto __);
+use Gimp;
use Gimp::Fu;
register "xach_blocks",
@@ -39,7 +39,7 @@ register "xach_blocks",
"Seth Burgess",
"Seth Burgess ",
"2-15-98",
- __"/Filters/Map/Xach Blocks",
+ "/Filters/Map/Xach Blocks",
"*",
[
[PF_SLIDER, "block_size", "The size of the blocks...", 10, [0, 255, 1]],
diff --git a/plug-ins/perl/examples/xachshadow.pl b/plug-ins/perl/examples/xachshadow.pl
index caa8d88e29..4103dd162b 100755
--- a/plug-ins/perl/examples/xachshadow.pl
+++ b/plug-ins/perl/examples/xachshadow.pl
@@ -22,7 +22,7 @@
#
# Here's the boring start of every script...
-use Gimp qw(:auto __);
+use Gimp;
use Gimp::Fu;
register "xach_shadows",
@@ -31,7 +31,7 @@ register "xach_shadows",
"Seth Burgess",
"Seth Burgess ",
"2-15-98",
- __"/Filters/Map/Xach Shadows",
+ "/Filters/Map/Xach Shadows",
"RGB*, GRAY*",
[
[PF_SLIDER, "block_size", "The size of the blocks...", 10, [0, 255, 1]],
diff --git a/plug-ins/perl/examples/xachvision.pl b/plug-ins/perl/examples/xachvision.pl
index cbe108b8c3..dcf6112dfb 100644
--- a/plug-ins/perl/examples/xachvision.pl
+++ b/plug-ins/perl/examples/xachvision.pl
@@ -12,7 +12,7 @@ register "xachvision",
"Seth Burgess",
"Seth Burgess ",
"1999-02-28",
- __"/Filters/Noise/Xach Vision",
+ "/Filters/Noise/Xach Vision",
"RGB*, GRAY*",
[
[PF_COLOR, "color", "What Color to see the world in", [0, 255, 0]],
diff --git a/plug-ins/perl/po/de.po b/plug-ins/perl/po/de.po
index 6457e74eb3..63249ebe00 100644
--- a/plug-ins/perl/po/de.po
+++ b/plug-ins/perl/po/de.po
@@ -263,13 +263,11 @@ msgstr "Server beendet sich..."
msgid "trying to start gimp with options \"$opt\"\n"
msgstr "Ich versuche, gimp mit den Schaltern \"$opt\" zu starten\n"
-#, fuzzy
msgid "/Xtns/Animation/Seth Spin"
-msgstr "/Xtn/"
+msgstr "/Xtn/Animation/Seth's Dreher"
-#, fuzzy
msgid "/Filters/Noise/Ditherize"
-msgstr "/Filter/"
+msgstr "/Filter/Noise/Rastern"
msgid "expected perl-server at other end of socket, got @r\n"
msgstr ""
@@ -280,9 +278,8 @@ msgstr "zu viele"
msgid "pdl height != region height"
msgstr "pdl Höhe != Höhe der Region"
-#, fuzzy
msgid "/Filters/Render/Add Glow"
-msgstr "/Filter/"
+msgstr "/Filter/Render/Add Glow"
msgid "received QUIT request"
msgstr "QUIT-Anfrage erhalten"
@@ -604,9 +601,8 @@ msgstr "Dateiauswahl for $name"
msgid "accepting connections on port $port"
msgstr "Akzeptiere Verbindungen auf port $port"
-#, fuzzy
msgid "/Filters/Misc/Border Average"
-msgstr "/Filter/"
+msgstr "/Filter/Verschiedenes/Rahmenfarbe"
msgid "Internal error: Gimp::Net #100, please report!"
msgstr ""
@@ -626,20 +622,17 @@ msgid "menupath _must_ start with , , , or !"
msgstr ""
"Menüpfad _muß_ mit , , , oder anfangen!"
-#, fuzzy
msgid "/Filters/Render/Terral Text"
-msgstr "/Filter/"
+msgstr "/Filter/Render/Terraltext"
msgid "illegal parasite specification, arrayref expected"
msgstr ""
-#, fuzzy
msgid "/Filters/Misc/Burst"
-msgstr "/Filter/"
+msgstr "/Filter/Verschiedenes/Ausbruch"
-#, fuzzy
msgid "/Xtns/Render/Povray/Texture"
-msgstr "/Xtn/Perl/Server"
+msgstr "/Xtn/Render/Povray/Textur"
msgid "unable to fork: $!"
msgstr "Konnte nicht forken: $!"