[gimp-perl] Examples had syntax, old menu locations. Bug 526998
- From: Kevin Cozens <kcozens src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-perl] Examples had syntax, old menu locations. Bug 526998
- Date: Wed, 26 Mar 2014 19:49:52 +0000 (UTC)
commit ff9aedfc70f28ccde0f0955955071f22b583b429
Author: Ed J <m8r-35s8eo mailinator com>
Date: Thu Mar 20 03:32:47 2014 +0000
Examples had syntax, old menu locations. Bug 526998
examples/animate_cells | 4 ++--
examples/billboard | 2 +-
examples/bricks | 2 +-
examples/burst | 1 +
examples/colorhtml | 10 ++++++++--
examples/example-fu | 2 +-
examples/gallery | 8 ++++----
examples/gimp-make-img-map | 24 ++++++++++++------------
examples/glowing_steel | 3 ++-
examples/goldenmean | 2 +-
examples/guides_to_selection | 2 +-
examples/innerbevel | 8 ++++----
examples/perlotine | 2 +-
examples/pixelmap | 4 +---
examples/randomart1 | 2 +-
examples/randomblends | 1 +
examples/selective_sharpen | 5 -----
examples/sethspin | 10 +++++-----
examples/stampify | 1 -
examples/stamps | 2 +-
examples/yinyang | 2 +-
21 files changed, 49 insertions(+), 48 deletions(-)
---
diff --git a/examples/animate_cells b/examples/animate_cells
index b2ed947..3021252 100755
--- a/examples/animate_cells
+++ b/examples/animate_cells
@@ -83,8 +83,8 @@ register
"animate_cells",
"Perform cell animation from a single, layered image",
"Use this plugin to animate a series of layers in the same way that\
- a physical animation process would use cells.",
- "Aaron Sherman", "Aaron Sherman (c)", "1999-03-15",
+ a physical animation process would use cells. Version $animate_cells_version",
+ "Aaron Sherman", "Aaron Sherman (c)", $animate_cells_released,
N_"<Image>/Filters/Animation/Animate Cells...",
"*",
[
diff --git a/examples/billboard b/examples/billboard
index feeed92..6883452 100755
--- a/examples/billboard
+++ b/examples/billboard
@@ -55,7 +55,7 @@ sub spin_layer { # the function for actually spinning the layer
@x = $img->selection_bounds();
# x[1],x[2] x[3],x[2]
# x[1],x[4] x[3],x[4]
- $floater = $framelay->transform_perspective_default(
+ $framelay->transform_perspective_default(
$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,
diff --git a/examples/bricks b/examples/bricks
index e23bcbc..d5a321a 100755
--- a/examples/bricks
+++ b/examples/bricks
@@ -139,7 +139,7 @@ register
"Tels",
"http://bloodgate.com",
"10/26/1999a",
- N_"<Toolbox>/Xtns/Render/Bricks...",
+ N_"<Image>/Filters/Render/Bricks...",
undef,
[
[PF_PATTERN, "background", "Brick pattern", "Leather"],
diff --git a/examples/burst b/examples/burst
index d2b20d2..56a6cb8 100755
--- a/examples/burst
+++ b/examples/burst
@@ -105,6 +105,7 @@ fades from if you have Fade set\n",
$progress_increment = 1/$points;
$progress = 0;
+ my $dumb;
($dumb, $x1, $y1, $x2, $y2) = $img->selection_bounds;
# $img->selection_none;
diff --git a/examples/colorhtml b/examples/colorhtml
index fc2e66b..76bc329 100755
--- a/examples/colorhtml
+++ b/examples/colorhtml
@@ -8,12 +8,15 @@ my %replace = (
"&" => "&",
"<" => "<",
">" => ">",
+);
# read some file, make text out of it
sub read_text {
my $fh = shift;
local $/;
my $data = <$fh>;
$data;
+}
+
register "file_colorhtml_save",
"Saves the image as coloured html text",
"=pod",
@@ -55,11 +58,11 @@ register "file_colorhtml_save",
my $data;
if ($source == 0) {
seek DATA, 0, 0;
- $data = read_text *DATA;
+ $data = read_text DATA;
} elsif ($source == 1) {
local *FILE;
open FILE, "<$text" or die "$text: $!\n";
- $data = read_text *FILE;
+ $data = read_text FILE;
} elsif ($source == 2) {
$data = $text;
}
@@ -129,8 +132,11 @@ HEADER
print FILE "</pre>\n</html>\n";
$new_img->delete if $export == EXPORT_EXPORT;
();
+};
+
Gimp::on_query {
Gimp->register_save_handler("file_colorhtml_save", "colorhtml", "");
+};
exit main;
=head1 COLORHTML FILE FORMAT
This file save filter writes a large regular grid filled with coloured
diff --git a/examples/example-fu b/examples/example-fu
index 1a05756..a4295e9 100755
--- a/examples/example-fu
+++ b/examples/example-fu
@@ -60,7 +60,7 @@ register "gimp_fu_example_script", # fill in a function name
Context->set_background($bg) unless $ignore;
fill $l BACKGROUND_FILL;
- $text_layer = $img->text_fontname(-1, 10, 10, $text, 5, 1, 10, PIXELS, $font);
+ my $text_layer = $img->text_fontname(-1, 10, 10, $text, 5, 1, 10, PIXELS, $font);
Context->set_foreground("green");
diff --git a/examples/gallery b/examples/gallery
index 40b7f93..382069d 100755
--- a/examples/gallery
+++ b/examples/gallery
@@ -80,7 +80,7 @@ sub galleryMaker {
$countTotal=`ls $path*.jpg | wc -l`+`ls $path*.JPG | wc -l`;
$gallerytitle=~s/ /_/g;
- opendir(cpath, $path) or die ("Unable to open destination path");
+ opendir(CPATH, $path) or die ("Unable to open destination path");
$sysval=system("mkdir $path$gallerytitle");
if ($sysval != 0){
Gimp->message(__"Make sure you've got write access to selected path ...\nMaybe the target path
already exist in which case you can simply change the Gallery title and launch again");
@@ -102,7 +102,7 @@ sub galleryMaker {
my $xcorrection=0;
Gimp->progress_init("Releasing the gallery");
- while (defined($cfile=readdir(cpath))) {
+ while (defined($cfile=readdir(CPATH))) {
if (( $cfile =~ /.jpg/ ) || ($cfile =~ /.JPG/)) {
my $img=gimp_file_load("$path$cfile", "$path$cfile");
my $clayer=gimp_image_get_active_layer($img);
@@ -155,8 +155,8 @@ sub galleryMaker {
$tbfname=~s/ /m/g;
system("cp $cvname $tbfname");
gimp_image_delete($img);
- my $img=gimp_file_load("$tbfname", "$tbfname");
- my $clayer=gimp_image_get_active_layer($img);
+ $img=gimp_file_load("$tbfname", "$tbfname");
+ $clayer=gimp_image_get_active_layer($img);
gimp_image_scale($img, $tbwidth, $tbheight);
#Processing detail HTML
diff --git a/examples/gimp-make-img-map b/examples/gimp-make-img-map
index bd6bfde..53beea1 100755
--- a/examples/gimp-make-img-map
+++ b/examples/gimp-make-img-map
@@ -52,6 +52,18 @@ Released under the Artistic license.
=cut
BEGIN {
+# Defaults
+$max_height = 64;
+$layout_width = 600;
+$bgcolor = [194,194,194];
+$decoration = 'drop-shadow';
+$gutter_x = 15;
+$gutter_y = 15;
+$pad_x = 20;
+$pad_y = 20;
+$compensate_for_darkening = 0;
+chop($PWD = `pwd`);
+
$HELP=<<__;
make-img-map - Make an image map from a list of images
@@ -93,18 +105,6 @@ __
use Gimp qw( :auto );
-# Defaults
-$max_height = 64;
-$layout_width = 600;
-$bgcolor = [194,194,194];
-$decoration = 'drop-shadow';
-$gutter_x = 15;
-$gutter_y = 15;
-$pad_x = 20;
-$pad_y = 20;
-$compensate_for_darkening = 0;
-chop($PWD = `pwd`);
-
# Routine for parsing the input format
sub get_next_record {
return (undef,undef) if eof(IN);
diff --git a/examples/glowing_steel b/examples/glowing_steel
index a7593ea..3e1b1b1 100755
--- a/examples/glowing_steel
+++ b/examples/glowing_steel
@@ -337,7 +337,8 @@ register
"a glowing surface. This effect was inspired by a poster for the ".
"film \"Lost In Space\".",
"Aaron Sherman", "Aaron Sherman (c)", "1999-06-14",
- N_"<Toolbox>/Xtns/Render/Logos/Glowing Steel",
+ N_"<Image>/Filters/Render/Logos/Glowing Steel",
+
undef,
[
[PF_STRING, "string", "string", "GET LOST"],
diff --git a/examples/goldenmean b/examples/goldenmean
index e962e9e..0cb18e2 100755
--- a/examples/goldenmean
+++ b/examples/goldenmean
@@ -35,7 +35,7 @@ register "golden_mean",
"Claes G Lindblad <claesg\ algonet se>",
"Claes G Lindblad <claesg\ algonet se>",
"990328",
- N_"<Toolbox>/Xtns/Render/Golden Mean...",
+ N_"<Image>/Filters/Render/Golden Mean...",
undef,
[
[PF_INT32, "short", "Shortest side", 233],
diff --git a/examples/guides_to_selection b/examples/guides_to_selection
index e81a399..ee18b8b 100755
--- a/examples/guides_to_selection
+++ b/examples/guides_to_selection
@@ -36,7 +36,7 @@ register "guide_to_selection",
my ($x,$y,$w,$h);
$x = $img->get_guide_position($i);
if ($img->get_guide_orientation($i) == ORIENTATION_HORIZONTAL) {
- ($x,$y,$w,$h) = (0,$x-$width,$W,1);
+ ($x,$y,$w,$h) = (0,$x-$w,$W,1);
} else {
($x,$y,$w,$h) = ($x,0,1,$H);
}
diff --git a/examples/innerbevel b/examples/innerbevel
index 079f462..d842bd7 100755
--- a/examples/innerbevel
+++ b/examples/innerbevel
@@ -17,7 +17,7 @@ N_"/Xtns/Render"; N_"/Xtns/Render/Logos"; # i18n workaround
$defaultcolor1 = [124,10,18];
$defaultcolor2 = [200,19,27];
-$path = N_"<Toolbox>/Xtns/Render/Logos/Inner Bevel...";
+$path = N_"<Image>/Filters/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";
@@ -75,9 +75,9 @@ $img = gimp_image_new($dims[0]+30, $dims[1]+10, RGB);
# i.e. create a text layer on transparent only...
# -- step 2 --
-$layertmp = $img->add_new_layer(0,TRANSPARENT_FILL);
-$txtlayer = $img->text_fontname(-1, 10, 10, $text, 0, 1, (split / /,$font)[-1], PIXELS, $font);
-$dsp = gimp_display_new($img); # display the image early
+$img->add_new_layer(0,TRANSPARENT_FILL);
+$img->text_fontname(-1, 10, 10, $text, 0, 1, (split / /,$font)[-1], PIXELS, $font);
+gimp_display_new($img); # display the image early
$layer = $img->merge_visible_layers(EXPAND_AS_NECESSARY);
@pt1 = ($layer->width * 0.5 -1, 0);
@pt2 = ($layer->width * 0.5 +1, $layer->height);
diff --git a/examples/perlotine b/examples/perlotine
index 251109f..74e4cc8 100755
--- a/examples/perlotine
+++ b/examples/perlotine
@@ -85,7 +85,7 @@ sub get_hguides {
sub dosel {
($img, $savepath, $imgpath, $imgbasename, $extension, $l,$r,$t,$b, $i,$j) = @_;
- $filename =~ m/^(.*)\.[^\.]*$/ ;
+# $filename =~ m/^(.*)\.[^\.]*$/ ;
$imgname = "$imgbasename-$i-$j.$extension";
$tmpimg = $img->duplicate;
# print "Cropping from $l to $r, $t to $b\n";
diff --git a/examples/pixelmap b/examples/pixelmap
index 5914364..5b65f80 100755
--- a/examples/pixelmap
+++ b/examples/pixelmap
@@ -70,7 +70,7 @@ register "pixelgen",
"Marc Lehmann",
"Marc Lehmann <pcg\ goof com>",
"19991115",
- N_"<Toolbox>/Xtns/Render/Pixelgenerator...",
+ N_"<Image>/Filters/Render/Pixelgenerator...",
undef,
[
[PF_SPINNER, "width" , "The width of the new image to generate", 512,
[1, 4096, 1]],
@@ -141,5 +141,3 @@ Copyright Marc Lehman.
Distributed under the same terms as Gimp-Perl.
=cut
-
-=cut
diff --git a/examples/randomart1 b/examples/randomart1
index c0998cd..68bfaa8 100755
--- a/examples/randomart1
+++ b/examples/randomart1
@@ -20,7 +20,7 @@ register "random_art_1", # Funktionsname
"Marc Lehmann", # Autor
"Marc Lehmann <pcg\ goof com", # Copyright
"0.4", # Version/Datum
- N_"<Toolbox>/Xtns/Render/Random Art #1...", # Men�pfad
+ N_"<Image>/Filters/Render/Random Art #1...", # Men�pfad
"", # Bildtypen
# Eingabeparameter
# Typ Name Beschreibung Wert
diff --git a/examples/randomblends b/examples/randomblends
index f9a6f3c..b724bf2 100755
--- a/examples/randomblends
+++ b/examples/randomblends
@@ -32,6 +32,7 @@ register "random_blends",
my($img,$layer,$numgradients) = _;
eval { $img->undo_group_start };
Context->push();
+ my $sel;
($sel,$x1,$y1,$x2,$y2) = $img->gimp_selection_bounds;
srand();
diff --git a/examples/selective_sharpen b/examples/selective_sharpen
index a9aa72d..5ead696 100755
--- a/examples/selective_sharpen
+++ b/examples/selective_sharpen
@@ -3,11 +3,6 @@
use Gimp ":auto";
use Gimp::Fu;
-# some #define's for edge detect plugin
-sub WRAP() {0}
-sub SMEAR() {1}
-sub BLACK() {2}
-
sub SOBEL() {0}
sub PREWITT() {1}
sub GRADIENT() {2}
diff --git a/examples/sethspin b/examples/sethspin
index 3a185ff..b065a5d 100755
--- a/examples/sethspin
+++ b/examples/sethspin
@@ -9,7 +9,7 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
# - Steinar H. Gunderson <sgunderson bigfoot com>
-# This one's all mine. Well, its GPL/Artisitic but I'm the author and creator.
+# This one's all mine. Well, its GPL/Artistic but I'm the author and creator.
# You need gimp 1.1 or better for this; too much has changed, and I don't think
# 1.0.x had a perspective PDB function anyway
@@ -78,9 +78,9 @@ sub saw { # a sawtooth function on PI
sub spin_layer { # the function for actually spinning the layer
my ($img, $spin, $dest, $numframes, $prp) = @_;
- my $floater, # The transformed image
+ my ($floater, # The transformed image
$framelay, # The background color
- $frameno; # The current frame
+ $frameno); # The current frame
# Now let's spin it!
$stepsize = 3.14159/$numframes; # in radians
@@ -131,7 +131,7 @@ register "seth_spin",
"Seth Burgess",
"Seth Burgess <sjburges\ gimp org>",
"1.7",
- N_"<Toolbox>/Xtns/Animation/Seth Spin...",
+ N_"<Image>/Filters/Animation/Seth Spin...",
"*",
[
[PF_DRAWABLE, "source", "What drawable to spin from?"],
@@ -187,7 +187,7 @@ register "seth_spin",
# go back from destination to spinlayer if spinning back
if ($spinback) {
- @layerlist = $img->get_layers();
+# @layerlist = $img->get_layers();
spin_layer($img, $destlayer, $spinlayer, $frames/2, $perspective);
}
diff --git a/examples/stampify b/examples/stampify
index 8f40a06..a6bf743 100755
--- a/examples/stampify
+++ b/examples/stampify
@@ -45,7 +45,6 @@ register "stampify",
$pos = $pos + $diameter + $gap;
}
# create vertical holes
- my $nholes = int (($nh + $gap) / ($diameter + $gap) + 0.5);
$pos = 0;
for ($i = 0; $i<$nholes; $i++) {
gimp_ellipse_select($img2,
diff --git a/examples/stamps b/examples/stamps
index cbf936d..34a853e 100755
--- a/examples/stamps
+++ b/examples/stamps
@@ -47,7 +47,7 @@ register "stamps",
"Claes G Lindblad <claesg\ algonet se>",
"Claes G Lindblad <claesg\ algonet se>",
"990314",
- N_"<Toolbox>/Xtns/Render/Stamps...",
+ N_"<Image>/Filters/Render/Stamps...",
undef,
[
[PF_INT32, "size", "img size", 90],
diff --git a/examples/yinyang b/examples/yinyang
index 5a8fd42..a835ec9 100755
--- a/examples/yinyang
+++ b/examples/yinyang
@@ -112,7 +112,7 @@ register("yinyang",
"Aaron Sherman",
"(c) 1998, Aaron Sherman",
"1999b",
- N_"<Toolbox>/Xtns/Render/Yin-Yang...",
+ N_"<Image>/Filters/Render/Yin-Yang...",
undef,
[
[PF_INT32, "width", "Width", 256],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]