diff --git a/plug-ins/perl/Changes b/plug-ins/perl/Changes index 65b49a08bf..60dbe530e5 100644 --- a/plug-ins/perl/Changes +++ b/plug-ins/perl/Changes @@ -30,6 +30,10 @@ Revision history for Gimp-Perl extension. - do not register menus when Gtk is needed for dialogs. - updated examples/burst. - fixed various old-syntax leftovers in Gimp::Util. + - modernized examples/example-fu. + - added examples/dust. + - updated po/Makefile.PL to find the scripts again. + - applied edit_fill change. Boy we need default agruments soon! 1.19 Thu Jan 6 00:21:58 CET 2000 - used N_ to mark all the menu paths, since gimp now tries to diff --git a/plug-ins/perl/MANIFEST b/plug-ins/perl/MANIFEST index dc621c6f72..26bcf84c0e 100644 --- a/plug-ins/perl/MANIFEST +++ b/plug-ins/perl/MANIFEST @@ -128,6 +128,7 @@ examples/roundsel examples/visual examples/billboard examples/blended2 +examples/dust pxgettext po/ChangeLog po/Makefile.PL diff --git a/plug-ins/perl/Makefile.PL b/plug-ins/perl/Makefile.PL index 0bab3697e2..a4080b4f48 100644 --- a/plug-ins/perl/Makefile.PL +++ b/plug-ins/perl/Makefile.PL @@ -43,7 +43,7 @@ if ($ARGV[0] ne "--writemakefile") { repdup centerguide stampify goldenmean triangle mirrorsplit layerfuncs randomart1 glowing_steel frame_reshuffle frame_filter logulator guide_remove guides_to_selection burst - layerfuncs bricks miff + layerfuncs bricks miff dust ); @pdl_pins = qw( diff --git a/plug-ins/perl/Net/Net.pm b/plug-ins/perl/Net/Net.pm index 6c8d4ca369..b394be4e47 100644 --- a/plug-ins/perl/Net/Net.pm +++ b/plug-ins/perl/Net/Net.pm @@ -16,6 +16,7 @@ use base qw(DynaLoader); use Socket; # IO::Socket is _really_ slow, so don't use it! use Gimp ('croak','__'); +use Fcntl qw(F_SETFD); require DynaLoader; @@ -158,6 +159,7 @@ sub start_server { return $server_fh; } elsif ($gimp_pid == 0) { close $server_fh; + fcntl $gimp_fh, F_SETFD, 0; delete $ENV{GIMP_HOST}; unless ($Gimp::verbose) { open STDIN," add to dist. * damnit libintl crazy shit -[DONE] * alow gimp_selection_shrink with a zero argument. * font_text with negative size? bug report #5523 * gimp-perl list archives.. where and add this to the gimp.html page! * g_direct_equal and glin hash, kill in favour of way nicer perl hashes. * ping-funktion für JENS. -[DONE] * never grayed out = "undef" imagetypes!!! -[DONE] * gimp_layer_set_name(4, "(null)") = gimp: fatal error: sigsegv caught -[KILL] * ftp://metalab.unc.edu/pub/Linux/X11/gtkbuffet/libs/gtkxmhtml/ into INSTALL * gtview_log (perlcc & helpfenster) erste zeile anzeigen + scrollbar -[DONE] * make test should not be run without DISPLAY * document on_xxx functions and register_callback * fix Gimp::Feature::missing => on_query-dir! -[DONE] * update logulator * on-query => remove gimp::fu parasite(?) [????] * bricks requires disable for pattern(?) -[KILL] * better default argument-handlign via a "massage_args" callback from Gimp/UI/interact? * installation & Feature system (?) * map_to_gradient does not work on GRAYA thingies. Argh. -[KILL] * scroll behaviour, use clist instead of list? * document Gimp::PDL and rect2, ...2 functions! * Kommandozeilenmodus(!). (???) * gimp-piddle must be written back automatically on destroy, if changed @@ -53,11 +45,11 @@ bugs important issues + * gimp_default_display -> undef when not available. * find_next_guide is a lousy interface. => just do num_guides * constant names (RADIO) automatically into help strings! * migrate BOOT: into INIT() (forgot why but important for B) * gimp_progress_done, gimp_progress_close -[KILL] * maybe implement --enable-perl=runtime-only? * gimp_default_display (...) for libgimp * Gimp::Module for modules (!) * gimp for dummies (you don't understand this, harharhar!) @@ -65,17 +57,12 @@ important issues * implement CALLBACKS via the Perl-Server * PF_COORDS (just as Light Effects/FlareFX) * PF_PREVIEW(!) -[KILL] * change set_usize to something else.. * Gimp::IO (?) * install scripts in share/ -[KILL] * gimp->object_id, drawable_object_id remove! * vamp up homepage * Gimp::ping * allow plug-ins to register with only a drawable argument(!) * gradient button -[KILL] * weighted movement in drawing tools -[KILL] * --function localfunc to select one of the registered scripts -[KILL] * create working progress when Net and $verbose * default parameters at end(!) * try to deduce default parameters diff --git a/plug-ins/perl/examples/Create_Images b/plug-ins/perl/examples/Create_Images index f93028c0fa..08fd1b1714 100755 --- a/plug-ins/perl/examples/Create_Images +++ b/plug-ins/perl/examples/Create_Images @@ -51,7 +51,7 @@ sub Create_Image { # Do the fun stuff with the text. gimp_palette_set_background($Text_Colour); gimp_layer_set_preserve_trans($Text_Layer, TRUE); - #gimp_edit_fill($Image, $Text_Layer); + #gimp_edit_fill($Image, $Text_Layer, BG_IMAGE_FILL); # Now figure out the size of $Text_Layer. $Width = gimp_drawable_width($Text_Layer); diff --git a/plug-ins/perl/examples/PDB b/plug-ins/perl/examples/PDB index 2c71811a1b..db6a123ac8 100755 --- a/plug-ins/perl/examples/PDB +++ b/plug-ins/perl/examples/PDB @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell #BEGIN {$^W=1}; diff --git a/plug-ins/perl/examples/alpha2color b/plug-ins/perl/examples/alpha2color index 01ea1eec9f..2bb9736b70 100755 --- a/plug-ins/perl/examples/alpha2color +++ b/plug-ins/perl/examples/alpha2color @@ -83,7 +83,7 @@ sub alpha2col { $target_layer->set_active_layer; $img->selection_all; - $target_layer->edit_fill; + $target_layer->edit_fill(BG_IMAGE_FILL); $img->selection_none; $foreground = gimp_image_merge_visible_layers($img,0); diff --git a/plug-ins/perl/examples/animate_cells b/plug-ins/perl/examples/animate_cells index 9d69981624..cdd5c6f4b8 100755 --- a/plug-ins/perl/examples/animate_cells +++ b/plug-ins/perl/examples/animate_cells @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # A plug-in for GIMP which animates a series of layers as if # they were animation cells (different from the normal gimp animation, diff --git a/plug-ins/perl/examples/avi b/plug-ins/perl/examples/avi index 4f4c8592f9..845d00f0de 100755 --- a/plug-ins/perl/examples/avi +++ b/plug-ins/perl/examples/avi @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # pcg@goof.com # a simpleminded uncompressed avi load/save plug-in diff --git a/plug-ins/perl/examples/blended2 b/plug-ins/perl/examples/blended2 index 22ceb1623d..0ce7623f5e 100755 --- a/plug-ins/perl/examples/blended2 +++ b/plug-ins/perl/examples/blended2 @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; @@ -36,7 +39,7 @@ sub my_innerbevel { $text2_lay=$text1_lay->copy(1); $img->add_layer($text2_lay, -1); gimp_palette_set_background ([255, 255, 255]); - $text2_lay->edit_fill; + $text2_lay->edit_fill(BG_IMAGE_FILL); $text2_lay->set_preserve_trans(0); $text1_lay->set_preserve_trans(0); plug_in_gauss_rle ($text2_lay, 6, 1, 1); diff --git a/plug-ins/perl/examples/blowinout b/plug-ins/perl/examples/blowinout index 59b81afa38..dbd3f50a4d 100755 --- a/plug-ins/perl/examples/blowinout +++ b/plug-ins/perl/examples/blowinout @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # Blow In/Out # John Pitney diff --git a/plug-ins/perl/examples/border b/plug-ins/perl/examples/border index 8285dade68..edfdb325ce 100755 --- a/plug-ins/perl/examples/border +++ b/plug-ins/perl/examples/border @@ -78,7 +78,7 @@ register "border_average", my $layer = new Layer ($image, width $image, height $image, RGB_IMAGE, "bordercolour", 100, NORMAL_MODE); add_layer $image $layer,0; Palette->set_background([$r,$g,$b]); - $layer->edit_fill; + $layer->edit_fill(BG_IMAGE_FILL) Gimp->message("Added layer with border colour ($r,$g,$b) on top"); } diff --git a/plug-ins/perl/examples/bricks b/plug-ins/perl/examples/bricks index 590c1c894a..612289df6f 100755 --- a/plug-ins/perl/examples/bricks +++ b/plug-ins/perl/examples/bricks @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # [10/27/1999] v0.0.1 First version. diff --git a/plug-ins/perl/examples/burst b/plug-ins/perl/examples/burst index 388d979b7b..ab933b87db 100755 --- a/plug-ins/perl/examples/burst +++ b/plug-ins/perl/examples/burst @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # diff --git a/plug-ins/perl/examples/centerguide b/plug-ins/perl/examples/centerguide index 57df621fab..68a6199e33 100755 --- a/plug-ins/perl/examples/centerguide +++ b/plug-ins/perl/examples/centerguide @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; diff --git a/plug-ins/perl/examples/colorhtml b/plug-ins/perl/examples/colorhtml index 58029b2d10..8ea702c480 100755 --- a/plug-ins/perl/examples/colorhtml +++ b/plug-ins/perl/examples/colorhtml @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # pcg@goof.com use Gimp; diff --git a/plug-ins/perl/examples/dataurl b/plug-ins/perl/examples/dataurl index 25fc586efd..4c250eb34d 100755 --- a/plug-ins/perl/examples/dataurl +++ b/plug-ins/perl/examples/dataurl @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # pcg@goof.com # this is not totally serious... diff --git a/plug-ins/perl/examples/ditherize b/plug-ins/perl/examples/ditherize index 6d8715aa26..17ca3bb5cf 100755 --- a/plug-ins/perl/examples/ditherize +++ b/plug-ins/perl/examples/ditherize @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use strict 'subs'; use Gimp; diff --git a/plug-ins/perl/examples/dust b/plug-ins/perl/examples/dust new file mode 100755 index 0000000000..7c4b625ee7 --- /dev/null +++ b/plug-ins/perl/examples/dust @@ -0,0 +1,138 @@ +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell + +use Gimp; +use Gimp::Fu; +use Gimp::Util; + +# this is silly, sorry that I am too dumb to come up with niftier functions :( +# btw, this should generate something between 1/f and 1/f² noise. +{ + my @weight = (1/8, 1/4, 1/2, 1); + my @dice; + my $total = 0; + my $tweight = 0; + my $n = 0; + my $seed; + + sub gen_rand() { + my ($prevrand, $newrand, $k); + + $n++; + for (0..$#weight) { + if ($n & (1<<$_)) { + $prevrand = $dice[$_]; + $newrand = rand() * $weight[$_]; + $dice[$_] = $newrand; + $total += $newrand - $prevrand; + } + } + + $total / $tweight; + } + + sub set_seed($) { + if ($_[0]) { + srand $_[0]; + } else { + srand; + } + $total = 0; + $tweight = 0; + for (0..$#weight) { + $dice[$_] = rand()*$weight[$_]; + $total += $dice[$_]; + $tweight += $weight[$_]; + } + } +} + +# the next line just shows a graph of the "random" numbers. +#set_seed 0; use PDL; use PDL::Graphics::PGPLOT; line(pdl(float,map gen_rand, 1..500)); + +register "dust", + "", + "", + "Marc Lehmann", + "Marc Lehmann /Filters/Render/Add Dust...", + "*", + # Eingabeparameter + # Typ Name Beschreibung Wert + [ + [PF_FLOAT, 'density', 'dust density in dust/pixel', 0.0001], + [PF_INT32, 'seed', 'the random seed (0 == unspecified)', 0], + [PF_SPINNER, 'length', 'the average dust corn length', 50, [1,300]], + ], + sub { # Perl-Code + # Die Parameter werden ganz "normal" übergeben: + my ($image, $layer, $density, $seed, $len) = @_; + + $len *= 0.75; + + set_seed $seed; + + my ($w, $h) = ($image->width, $image->height); + + $image->undo_push_group_start; + + my $state = Gimp::Util::get_state(); + Palette->set_foreground("white"); + Brushes->set_brush("Circle (01)"); + Brushes->set_opacity(50); + Brushes->set_spacing(100); + Brushes->set_paint_mode(NORMAL_MODE); + + if (1) { + $layer = $image->add_new_layer (0, TRANS_IMAGE_FILL, 1); + $layer->set_mode(DIFFERENCE_MODE); + } + + for (1..($w*$h*$density)) { + my ($x, $y) = (rand $w, rand $h); + my $l = int($len + rand $len); + my @c; + my $b = 0; + for (1..$l) { + push @c, $b += 5*(gen_rand-0.5); + push @c, $b += 5*(gen_rand-0.5); + } + + $layer->paintbrush_default([map { $x+$c[$_], $y+$c[$_+$l] } 0..$l-1]); + } + + Gimp::Util::set_state($state); + + $image->undo_push_group_end; + + (); +}; + +#register "gen_rand_1f", +# "generate 1/f noise", +# "Generate approximate 1/f (white) noise in the range [0,1[", +# "Marc Lehmann", +# "Marc Lehmann ", +# undef, +# # Eingabeparameter +# # Typ Name Beschreibung Wert +# [ +# [PF_FLOAT, 'count', 'the number of values', 1], +# [PF_INT32, 'seed', 'the random seed (0 == unspecified)', 0], +# ], +# [ +# [&Gimp::PARAM_FLOATARRAY,'noise','the requested number of 1/f noise values'], +# ], +# sub { +# my ($count, $seed) = @_; +# set_seed $seed; +# [map gen_rand_1f, 1..$count]; +# }; + +exit main; + diff --git a/plug-ins/perl/examples/example-fu b/plug-ins/perl/examples/example-fu index d347c12bba..1d93ea4567 100755 --- a/plug-ins/perl/examples/example-fu +++ b/plug-ins/perl/examples/example-fu @@ -9,8 +9,8 @@ register "gimp_fu_example_script", # fill in a function name "scripts. Always remember to put a long". "help message here!", "Marc Lehmann ", # don't forget your name (author) - "(c) 1998, 1999 Marc Lehmann", # and your copyright! - "19990316", # the date this script was written + "(c)1998,1999,2000 Marc Lehmann", # and your copyright! + "20000321", # the date this script was written (YYYYMMDD) N_"/Xtns/Gimp::Fu Example", # the menu path "RGB*, GRAYA", # image types to accept (RGB, RGAB amnd GRAYA) [ @@ -34,19 +34,19 @@ register "gimp_fu_example_script", # fill in a function name sub { # now do sth. useful with the garbage we got ;) - my($width,$height,$text,$font,$fg,$bg,$ignore,$brush,$pattern,$gradient)=@_; + my($width,$height,$text,$brd1,$brd2,$font,$fg,$bg,$ignore,$xtraimg,$xtradrw,$effecttype,$brush,$pattern,$gradient)=@_; - # set tracing - Gimp::set_trace(TRACE_ALL); + # set tracing, disable this to get rid of the debugging output + Gimp::set_trace(TRACE_CALL); - my $img=new Image($width,$height,RGB); + my $img = new Image ($width, $height, RGB); # put an undo group around any modifications, so that - # they can be undone in one step. The eval shields against - # gimp-1.0, which does not have this function. - eval { $img->undo_push_group_start }; + # they can be undone in one step. + $img->undo_push_group_start; - my $l=new Layer($img,$width,$height,RGB,"Background",100,NORMAL_MODE); + # the __ before the string in the next line indicates text that must be translated + my $l = new Layer ($img, $width, $height, RGB, __"Background", 100, NORMAL_MODE); $l->add_layer(0); # now a few syntax examples @@ -55,13 +55,12 @@ register "gimp_fu_example_script", # fill in a function name Palette->set_background($bg) unless $ignore; fill $l BG_IMAGE_FILL; + $text_layer = $img->text_fontname(-1, 10, 10, $text, 5, 1, xlfd_size($font), $font); - $text_layer=$img->text_fontname(-1,10,10,$text,5,1,xlfd_size($font),$font); - - gimp_palette_set_foreground("green"); + Palette->set_foreground("green"); # close the undo push group - eval { $img->undo_push_group_end }; + $img->undo_push_group_end; $img; # return the image, or an empty list, i.e. () }; diff --git a/plug-ins/perl/examples/example-net b/plug-ins/perl/examples/example-net index eae4c85fc2..a08f21b465 100755 --- a/plug-ins/perl/examples/example-net +++ b/plug-ins/perl/examples/example-net @@ -22,8 +22,8 @@ Gimp::on_net { for $i (0..255) { Palette->set_background([$i,255-$i,$i]); - $bg->edit_fill; - Display->displays_flush (); + $bg->edit_fill(BG_IMAGE_FILL); + Display->displays_flush(); } # Gimp::Net::server_quit; # kill the gimp-perl-server-extension (ugly name) }; diff --git a/plug-ins/perl/examples/fit-text b/plug-ins/perl/examples/fit-text index a14d0f2d14..ff268fd3ed 100755 --- a/plug-ins/perl/examples/fit-text +++ b/plug-ins/perl/examples/fit-text @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # This is adrian and xachs idea - take a rectangluar selection, and select diff --git a/plug-ins/perl/examples/font_table b/plug-ins/perl/examples/font_table index a78560ba28..75b32b637b 100755 --- a/plug-ins/perl/examples/font_table +++ b/plug-ins/perl/examples/font_table @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # Font Table plugin for The Gimp # diff --git a/plug-ins/perl/examples/frame_filter b/plug-ins/perl/examples/frame_filter index 31e7be8a75..3ddf2f95b5 100755 --- a/plug-ins/perl/examples/frame_filter +++ b/plug-ins/perl/examples/frame_filter @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; diff --git a/plug-ins/perl/examples/frame_reshuffle b/plug-ins/perl/examples/frame_reshuffle index 4ad9221f0b..7b31bdf756 100755 --- a/plug-ins/perl/examples/frame_reshuffle +++ b/plug-ins/perl/examples/frame_reshuffle @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp 1.095; use Gimp::Fu; diff --git a/plug-ins/perl/examples/gimp-make-img-map b/plug-ins/perl/examples/gimp-make-img-map index b6a742cc40..8fa74f63fe 100755 --- a/plug-ins/perl/examples/gimp-make-img-map +++ b/plug-ins/perl/examples/gimp-make-img-map @@ -237,12 +237,12 @@ sub decoration_drop_shadow { # why is the selection cleared? $tiled_img->rect_select($xpos, $ypos, $w, $h, 0, 0, 0); - $tiled_img->edit_fill($tiled_drw_msk); + $tiled_img->edit_fill($tiled_drw_msk, BG_IMAGE_FILL); # why is the selection cleared? $tiled_img->rect_select($xpos+$shadow_xoffs, $ypos+$shadow_yoffs, $w, $h, 0, 0, 0); - $tiled_img->edit_fill($tiled_shadow_msk); + $tiled_img->edit_fill($tiled_shadow_msk, BG_IMAGE_FILL); $tiled_img->selection_none(); @@ -316,12 +316,12 @@ sub decoration_sunken_windows { $bw = 3; $tiled_img->rect_select($xpos-$bw, $ypos-$bw, $w+2*$bw, $h+2*$bw, 0, 0, 0); - $tiled_img->edit_fill($tiled_punch_stencil); + $tiled_img->edit_fill($tiled_punch_stencil, BG_IMAGE_FILL); # why is the selection cleared? $tiled_img->selection_none(); $tiled_img->rect_select($xpos, $ypos, $w, $h, 0, 0, 0); - $tiled_img->edit_fill($tiled_punch_mask); + $tiled_img->edit_fill($tiled_punch_mask, BG_IMAGE_FILL); $tiled_img->selection_none(); } diff --git a/plug-ins/perl/examples/glowing_steel b/plug-ins/perl/examples/glowing_steel index bb0757390c..e80c32cdae 100755 --- a/plug-ins/perl/examples/glowing_steel +++ b/plug-ins/perl/examples/glowing_steel @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # A plug-in for GIMP for producing logos and other such nifty things # which appear to be made of steel and floating over a glowing cloud. diff --git a/plug-ins/perl/examples/goldenmean b/plug-ins/perl/examples/goldenmean index 1b87edeea2..2cfd92c1e7 100755 --- a/plug-ins/perl/examples/goldenmean +++ b/plug-ins/perl/examples/goldenmean @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; @@ -21,7 +24,7 @@ sub goldenmean { gimp_image_add_layer($layer, -1); gimp_palette_set_background([255, 255, 255]); - $layer->gimp_edit_fill; + $layer->gimp_edit_fill(BG_IMAGE_FILL); return $img; } diff --git a/plug-ins/perl/examples/guide_remove b/plug-ins/perl/examples/guide_remove index 45c0f60a20..812b597a57 100755 --- a/plug-ins/perl/examples/guide_remove +++ b/plug-ins/perl/examples/guide_remove @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # 11/7/99 diff --git a/plug-ins/perl/examples/guidegrid b/plug-ins/perl/examples/guidegrid index c217525b45..d73ac8bdca 100755 --- a/plug-ins/perl/examples/guidegrid +++ b/plug-ins/perl/examples/guidegrid @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # (original release) # diff --git a/plug-ins/perl/examples/guides_to_selection b/plug-ins/perl/examples/guides_to_selection index bc0d2a7768..b9a6561bca 100755 --- a/plug-ins/perl/examples/guides_to_selection +++ b/plug-ins/perl/examples/guides_to_selection @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp; use Gimp::Fu; diff --git a/plug-ins/perl/examples/image_tile b/plug-ins/perl/examples/image_tile index 060977492a..1a0d2710da 100755 --- a/plug-ins/perl/examples/image_tile +++ b/plug-ins/perl/examples/image_tile @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # A photo-tiling pluggin. Take an image, and tile it (much like the # mosaic operation, only using other images). diff --git a/plug-ins/perl/examples/innerbevel b/plug-ins/perl/examples/innerbevel index 802ff5c65a..e2454f7d6c 100755 --- a/plug-ins/perl/examples/innerbevel +++ b/plug-ins/perl/examples/innerbevel @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # Effect taken from http://tigert.gimp.org/gimp/tutorials/beveled_text/ # perl-ified by Seth Burgess @@ -76,7 +79,7 @@ $img->add_layer($layer2, 0); $layer2->set_preserve_trans(1); $img->selection_all; gimp_palette_set_background([255,255,255]); -$layer2->edit_fill; +$layer2->edit_fill(BG_IMAGE_FILL); # -- step 6 -- $layer2->set_preserve_trans(0); $layer2->gauss_rle(6,1,1); # Defaults would be cool here too :) diff --git a/plug-ins/perl/examples/layerfuncs b/plug-ins/perl/examples/layerfuncs index 7a357f2b14..9fd5a74603 100755 --- a/plug-ins/perl/examples/layerfuncs +++ b/plug-ins/perl/examples/layerfuncs @@ -1,4 +1,7 @@ -#!/usr/bin/perl -w +#!/usr/app/bin/perl -w + +eval 'exec /usr/app/bin/perl -w -S $0 ${1+"$@"}' + if 0; # not running under some shell # use Gimp; use Gimp::Fu; diff --git a/plug-ins/perl/examples/logulator b/plug-ins/perl/examples/logulator index 007a171607..279a67e5eb 100755 --- a/plug-ins/perl/examples/logulator +++ b/plug-ins/perl/examples/logulator @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; @@ -147,7 +150,7 @@ sub script_fu_3d_outline_logo { gimp_image_resize ($img, $width, $height, 0, 0); gimp_image_add_layer ($img, $pattern, 1); gimp_image_add_layer ($img, $bg_layer, 2); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_edit_clear ($pattern); gimp_layer_set_preserve_trans ($text_layer, 0); plug_in_gauss_iir ($img, $text_layer, $outline_blur_radius, 1, 1); @@ -222,13 +225,13 @@ sub script_fu_alien_glow_logo { gimp_image_add_layer ($img, $glow_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_edit_clear ($glow_layer); gimp_selection_layer_alpha ($text_layer); gimp_selection_grow ($img, $grow); gimp_selection_feather ($img, $feather); gimp_palette_set_background ($glow_color); - gimp_edit_fill ($glow_layer); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_background ([0, 0, 0]); gimp_palette_set_foreground ([79, 79, 79]); @@ -274,14 +277,14 @@ sub script_fu_basic1_logo { gimp_image_add_layer ($img, $bg_layer, 2); gimp_palette_set_background ($text_color); gimp_layer_set_preserve_trans ($text_layer, 1); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_edit_clear ($shadow_layer); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); gimp_selection_feather ($img, 7.5); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_foreground ([255, 255, 255]); gimp_blend ($text_layer, FG_BG_RGB, MULTIPLY_MODE, RADIAL, 100, 20, REPEAT_NONE, 0, 0, 0, 0, 0, $width, $height); @@ -344,17 +347,17 @@ sub script_fu_basic2_logo { gimp_image_add_layer ($img, $highlight_layer, 1); gimp_palette_set_background ($text_color); gimp_layer_set_preserve_trans ($text_layer, 1); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_edit_clear ($shadow_layer); gimp_palette_set_background (color_highlight ($text_color)); gimp_layer_set_preserve_trans ($highlight_layer, 1); - gimp_edit_fill ($highlight_layer); + gimp_edit_fill ($highlight_layer, BG_IMAGE_FILL); gimp_palette_set_background ($bg_color); gimp_drawable_fill ($bg_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); gimp_selection_feather ($img, 7.5); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_foreground ([255, 255, 255]); gimp_blend ($text_layer, FG_BG_RGB, MULTIPLY_MODE, RADIAL, 100, 20, REPEAT_NONE, 0, 0, 0, 0, 0, $width, $height); @@ -423,21 +426,21 @@ sub script_fu_blended_logo { gimp_edit_clear ($drop_shadow_layer); gimp_palette_set_background ($text_color); gimp_layer_set_preserve_trans ($text_layer, 1); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_palette_set_background ($bg_color); gimp_drawable_fill ($shadow_layer, BG_IMAGE_FILL); gimp_rect_select ($img, $b_size_2, $b_size_2, ($width - $b_size), ($height - $b_size), REPLACE, 1, $b_size_2); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_image_add_layer_mask ($img, $text_shadow_layer, $tsl_layer_mask); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($tsl_layer_mask); + gimp_edit_fill ($tsl_layer_mask, BG_IMAGE_FILL); gimp_selection_feather ($img, $f_size); gimp_palette_set_background ([63, 63, 63]); - gimp_edit_fill ($drop_shadow_layer); + gimp_edit_fill ($drop_shadow_layer, BG_IMAGE_FILL); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($text_shadow_layer); + 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_MODE, SHAPEBURST_ANGULAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, 1, 1); gimp_selection_none ($img); @@ -451,7 +454,7 @@ sub script_fu_blended_logo { gimp_selection_layer_alpha ($blend_layer); gimp_image_add_layer_mask ($img, $drop_shadow_layer, $dsl_layer_mask); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($dsl_layer_mask); + gimp_edit_fill ($dsl_layer_mask, BG_IMAGE_FILL); gimp_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY); gimp_selection_none ($img); gimp_layer_set_name ($text_layer, $text); @@ -498,18 +501,18 @@ sub script_fu_bovinated_logo { gimp_image_add_layer ($img, $bg_layer, 1); gimp_image_add_layer ($img, $blur_layer, 1); gimp_selection_all ($img); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($blur_layer, 1); gimp_palette_set_background ([255, 255, 255]); gimp_selection_all ($img); - gimp_edit_fill ($blur_layer); + gimp_edit_fill ($blur_layer, BG_IMAGE_FILL); gimp_edit_clear ($blur_layer); gimp_palette_set_background ([191, 191, 191]); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($blur_layer, 0); gimp_selection_layer_alpha ($text_layer); - gimp_edit_fill ($blur_layer); + gimp_edit_fill ($blur_layer, BG_IMAGE_FILL); plug_in_gauss_rle ($img, $blur_layer, 5.0, 1, 1); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($text_layer, 1); @@ -608,9 +611,9 @@ sub script_fu_carved_logo { gimp_image_undo_disable ($img); gimp_layer_set_preserve_trans ($mask_layer, 1); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($mask_layer); + gimp_edit_fill ($mask_layer, BG_IMAGE_FILL); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($mask); + gimp_edit_fill ($mask, BG_IMAGE_FILL); plug_in_tile ($img, $layer1, $width, $height, 0); gimp_image_add_channel ($img, $mask, 0); gimp_edit_copy ($mask_layer); @@ -634,9 +637,9 @@ sub script_fu_carved_logo { gimp_palette_set_background ([180, 180, 180]); gimp_selection_load ($mask_fat); gimp_selection_invert ($img); - gimp_edit_fill ($mask_emboss); + gimp_edit_fill ($mask_emboss, BG_IMAGE_FILL); gimp_selection_load ($mask); - gimp_edit_fill ($mask_emboss); + gimp_edit_fill ($mask_emboss, BG_IMAGE_FILL); gimp_selection_none ($img); $mask_highlight = gimp_channel_copy ($mask_emboss); gimp_image_add_channel ($img, $mask_highlight, 0); @@ -662,14 +665,14 @@ sub script_fu_carved_logo { gimp_image_add_layer_mask ($img, $cast_shadow_layer, $csl_mask); gimp_selection_load ($mask); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($csl_mask); + gimp_edit_fill ($csl_mask, BG_IMAGE_FILL); $inset_layer = gimp_layer_copy ($layer1, 1); gimp_image_add_layer ($img, $inset_layer, 1); $il_mask = gimp_layer_create_mask ($inset_layer, BLACK_MASK); gimp_image_add_layer_mask ($img, $inset_layer, $il_mask); gimp_selection_load ($mask); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($il_mask); + gimp_edit_fill ($il_mask, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_levels ($inset_layer, 0, 0, 255, $inset_gamma, 0, 255); gimp_image_remove_channel ($img, $mask); @@ -721,10 +724,10 @@ sub script_fu_chalk_logo { gimp_image_resize ($img, $width, $height, 0, 0); gimp_image_add_layer ($img, $bg_layer, 1); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_palette_set_background ($chalk_color); gimp_selection_layer_alpha ($text_layer); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_selection_none ($img); plug_in_gauss_rle ($img, $text_layer, 2.0, 1, 1); plug_in_spread ($img, $text_layer, 5.0, 5.0); @@ -782,13 +785,13 @@ sub script_fu_logo_chip_away { if ($bg_fill) { gimp_bucket_fill ($bg_layer, 2, NORMAL_MODE, 100, 255, 0, 1, 1); } else { - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); } gimp_selection_all ($img); gimp_edit_clear ($bump_layer); gimp_selection_none ($img); gimp_selection_layer_alpha ($text_layer); - gimp_edit_fill ($bump_layer); + gimp_edit_fill ($bump_layer, BG_IMAGE_FILL); gimp_bucket_fill ($text_layer, 2, NORMAL_MODE, 100, 255, 0, 1, 1); gimp_selection_none ($img); gimp_image_add_layer ($img, $bump_layer, 1); @@ -809,7 +812,7 @@ sub script_fu_logo_chip_away { gimp_selection_none ($img); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); plug_in_gauss_rle ($img, $shadow_layer, 5, 1, 1); gimp_image_add_layer ($img, $shadow_layer, 1); @@ -883,21 +886,21 @@ sub script_fu_chrome_logo { gimp_image_add_layer ($img, $layer1, 1); gimp_palette_set_background ([255, 255, 255]); gimp_selection_none ($img); - gimp_edit_fill ($layer1); - gimp_edit_fill ($layer2); - gimp_edit_fill ($layer3); + gimp_edit_fill ($layer1, BG_IMAGE_FILL); + gimp_edit_fill ($layer2, BG_IMAGE_FILL); + gimp_edit_fill ($layer3, BG_IMAGE_FILL); gimp_edit_clear ($shadow); gimp_selection_layer_alpha ($text_layer); gimp_layer_set_visible ($text_layer, 0); gimp_layer_set_visible ($shadow, 0); gimp_layer_set_visible ($background, 0); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($layer1); + gimp_edit_fill ($layer1, BG_IMAGE_FILL); gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_feather ($img, $feather); - gimp_edit_fill ($layer2); + gimp_edit_fill ($layer2, BG_IMAGE_FILL); gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2); - gimp_edit_fill ($layer3); + gimp_edit_fill ($layer3, BG_IMAGE_FILL); gimp_selection_none ($img); $layer1 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE); gimp_invert ($layer1); @@ -905,13 +908,13 @@ sub script_fu_chrome_logo { gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); gimp_selection_feather ($img, $feather); - gimp_edit_fill ($layer_mask); + gimp_edit_fill ($layer_mask, BG_IMAGE_FILL); gimp_palette_set_background ([0, 0, 0]); gimp_selection_translate ($img, $offx1, $offy1); - gimp_edit_fill ($shadow); + gimp_edit_fill ($shadow, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($background); + gimp_edit_fill ($background, BG_IMAGE_FILL); gimp_image_remove_layer ($img, $text_layer); gimp_layer_set_visible ($shadow, 1); gimp_layer_set_visible ($background, 1); @@ -960,12 +963,12 @@ sub script_fu_comic_logo { gimp_image_add_layer ($img, $black_layer, 1); gimp_layer_set_name ($black_layer, "Black"); gimp_selection_all ($img); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($white_layer, 1); gimp_palette_set_background ([255, 255, 255]); gimp_selection_all ($img); - gimp_edit_fill ($white_layer); + gimp_edit_fill ($white_layer, BG_IMAGE_FILL); gimp_layer_set_preserve_trans ($white_layer, 0); plug_in_spread ($img, $white_layer, 3 * $ol_width, 3 * $ol_width); plug_in_gauss_rle ($img, $white_layer, 2 * $ol_width, 1, 1); @@ -974,7 +977,7 @@ sub script_fu_comic_logo { gimp_palette_set_background ([0, 0, 0]); gimp_layer_set_preserve_trans ($black_layer, 1); gimp_selection_all ($img); - gimp_edit_fill ($black_layer); + gimp_edit_fill ($black_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($black_layer, 0); plug_in_gauss_rle ($img, $black_layer, $ol_width, 1, 1); @@ -1045,10 +1048,10 @@ sub script_fu_cool_metal_logo { gimp_image_add_layer ($img, $shadow_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_edit_clear ($reflect_layer); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); if ($seascape == 1) { gimp_gradients_set_active ("Horizon_2"); } else { @@ -1069,7 +1072,7 @@ sub script_fu_cool_metal_logo { gimp_selection_layer_alpha ($text_layer); gimp_selection_invert ($img); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($channel); + gimp_edit_fill ($channel, BG_IMAGE_FILL); gimp_selection_none ($img); plug_in_bump_map ($img, $text_layer, $channel, 135, 45, $depth, 0, 0, 0, 0, 0, 0, 0); gimp_selection_layer_alpha ($text_layer); @@ -1250,16 +1253,16 @@ sub script_fu_crystal_logo { gimp_image_add_layer ($img, $layer2, 0); gimp_palette_set_background ([255, 255, 255]); gimp_selection_none ($img); - gimp_edit_fill ($layer2); - gimp_edit_fill ($layer3); + gimp_edit_fill ($layer2, BG_IMAGE_FILL); + gimp_edit_fill ($layer3, BG_IMAGE_FILL); gimp_layer_set_visible ($text_layer, 0); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_feather ($img, $feather); - gimp_edit_fill ($layer2); + gimp_edit_fill ($layer2, BG_IMAGE_FILL); gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2); - gimp_edit_fill ($layer3); + gimp_edit_fill ($layer3, BG_IMAGE_FILL); gimp_selection_none ($img); $layer2 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE); gimp_invert ($layer2); @@ -1275,7 +1278,7 @@ sub script_fu_crystal_logo { gimp_image_add_layer_mask ($img, $layer1, $layer_mask); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($layer_mask); + gimp_edit_fill ($layer_mask, BG_IMAGE_FILL); $disp_map = gimp_selection_save ($img); gimp_brushes_set_brush (crystal_brush ($brush_size)); gimp_palette_set_foreground ([0, 0, 0]); @@ -1296,14 +1299,14 @@ sub script_fu_crystal_logo { gimp_image_add_layer_mask ($img, $layer2, $layer_mask2); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($layer_mask2); + gimp_edit_fill ($layer_mask2, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_levels ($layer2, 0, 0, 200, 1.5, 50, 255); gimp_layer_set_mode ($layer1, OVERLAY_MODE); plug_in_gauss_rle ($img, $text_layer, $blur, 1, 1); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_layer_set_mode ($text_layer, OVERLAY_MODE); gimp_layer_translate ($text_layer, $offx1, $offy1); gimp_image_remove_channel ($img, $disp_map); @@ -1380,7 +1383,7 @@ sub script_fu_frosty_logo { $selection = gimp_selection_save ($img); gimp_selection_feather ($img, $border); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($sparkle_layer); + gimp_edit_fill ($sparkle_layer, BG_IMAGE_FILL); plug_in_noisify ($img, $sparkle_layer, 0, 0.2, 0.2, 0.2, 0.0); plug_in_c_astretch ($img, $sparkle_layer); gimp_selection_none ($img); @@ -1392,19 +1395,19 @@ sub script_fu_frosty_logo { gimp_brushes_set_brush ("Circle Fuzzy (11)"); gimp_edit_stroke ($matte_layer); gimp_selection_feather ($img, $border); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_image_add_layer_mask ($img, $text_layer, $text_layer_mask); gimp_selection_load ($selection); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($text_layer_mask); + gimp_edit_fill ($text_layer_mask, BG_IMAGE_FILL); gimp_selection_feather ($img, $border); gimp_selection_translate ($img, $border / 2, $border / 2); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_image_remove_layer_mask ($img, $text_layer, 0); gimp_selection_load ($selection); gimp_brushes_set_brush ("Circle Fuzzy (07)"); @@ -1511,7 +1514,7 @@ sub script_fu_glossy_logo { gimp_image_add_layer ($img, $drop_sh_layer, 2); gimp_selection_layer_alpha ($drop_sh_layer); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($drop_sh_layer); + gimp_edit_fill ($drop_sh_layer, BG_IMAGE_FILL); gimp_selection_none ($img); plug_in_gauss_rle ($drop_sh_layer, 15, 1, 1); gimp_layer_set_offsets ($drop_sh_layer, $s_offset_x, $s_offset_y); @@ -1582,25 +1585,25 @@ sub script_fu_glowing_logo { gimp_image_add_layer ($img, $glow_layer, 1); gimp_selection_none ($img); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_selection_feather ($img, $feather1); gimp_palette_set_background ([221, 0, 0]); - gimp_edit_fill ($glow_layer); - gimp_edit_fill ($glow_layer); - gimp_edit_fill ($glow_layer); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_selection_feather ($img, $feather2); gimp_palette_set_background ([232, 217, 18]); - gimp_edit_fill ($glow_layer); - gimp_edit_fill ($glow_layer); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_selection_feather ($img, $feather3); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($glow_layer); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_layer_set_name ($text_layer, $text); gimp_layer_set_mode ($text_layer, OVERLAY_MODE); @@ -1647,17 +1650,17 @@ sub script_fu_gradient_bevel_logo { gimp_image_add_layer ($img, $bg_layer, 1); gimp_image_add_layer ($img, $blur_layer, 1); gimp_selection_all ($img); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($blur_layer, 1); gimp_palette_set_background ([255, 255, 255]); gimp_selection_all ($img); - gimp_edit_fill ($blur_layer); + gimp_edit_fill ($blur_layer, BG_IMAGE_FILL); gimp_edit_clear ($blur_layer); gimp_selection_none ($img); gimp_layer_set_preserve_trans ($blur_layer, 0); gimp_selection_layer_alpha ($text_layer); - gimp_edit_fill ($blur_layer); + gimp_edit_fill ($blur_layer, BG_IMAGE_FILL); plug_in_gauss_rle ($img, $blur_layer, $bevel_width, 1, 1); gimp_selection_none ($img); gimp_palette_set_background ([127, 127, 127]); @@ -1726,19 +1729,19 @@ sub script_fu_i26_gunya2 { gimp_edit_clear ($dist_frame_layer); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ($text_color); - gimp_edit_fill ($dist_text_layer); + gimp_edit_fill ($dist_text_layer, BG_IMAGE_FILL); gimp_selection_border ($img, $frame_size); gimp_palette_set_background ($frame_color); - gimp_edit_fill ($dist_frame_layer); + gimp_edit_fill ($dist_frame_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($distortion_layer); + gimp_edit_fill ($distortion_layer, BG_IMAGE_FILL); plug_in_noisify ($distortion_img, $distortion_layer, 0, $prob, $prob, $prob, 0.0); plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1); plug_in_c_astretch ($distortion_img, $distortion_layer); plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1); plug_in_displace ($img, $dist_text_layer, $radius, $radius, 1, 1, $distortion_layer, $distortion_layer, 0); - gimp_edit_fill ($distortion_layer); + gimp_edit_fill ($distortion_layer, BG_IMAGE_FILL); plug_in_noisify ($distortion_img, $distortion_layer, 0, $prob, $prob, $prob, 0.0); plug_in_gauss_rle ($distortion_img, $distortion_layer, $radius, 1, 1); plug_in_c_astretch ($distortion_img, $distortion_layer); @@ -1746,7 +1749,7 @@ sub script_fu_i26_gunya2 { plug_in_displace ($img, $dist_frame_layer, $radius, $radius, 1, 1, $distortion_layer, $distortion_layer, 0); gimp_selection_all ($img); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_palette_set_foreground ($old_fg); gimp_palette_set_background ($old_bg); gimp_brushes_set_brush ($old_brush); @@ -1900,17 +1903,17 @@ sub script_fu_neon_logo { $selection = gimp_selection_save ($img); gimp_selection_none ($img); gimp_edit_clear ($glow_layer); - gimp_edit_fill ($tube_layer); + gimp_edit_fill ($tube_layer, BG_IMAGE_FILL); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_selection_load ($selection); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($tube_layer); + gimp_edit_fill ($tube_layer, BG_IMAGE_FILL); gimp_selection_shrink ($img, $shrink); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($selection); + gimp_edit_fill ($selection, BG_IMAGE_FILL); if ($float_height >= 100) { - gimp_edit_fill ($tube_layer); #this way the user has to choose a REAL big font + gimp_edit_fill ($tube_layer, BG_IMAGE_FILL); #this way the user has to choose a REAL big font } #in order to get the original effect!! gimp_selection_none ($img); if (not ($feather1 == 0)) { @@ -1946,7 +1949,7 @@ sub script_fu_neon_logo { gimp_selection_invert ($img); gimp_selection_feather ($img, $feather); gimp_palette_set_background ($glow_color); - gimp_edit_fill ($glow_layer); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); if (not ($shadow == 0)) { do { gimp_selection_layer_alpha ($tube_layer); @@ -1954,7 +1957,7 @@ sub script_fu_neon_logo { gimp_selection_feather ($img, $shadow_feather); gimp_selection_translate ($img, $shadow_offx, $shadow_offy); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); }; } gimp_selection_none ($img); @@ -2007,7 +2010,7 @@ sub script_fu_newsprint_text { gimp_image_add_layer_mask ($img, $text_layer, $text_mask); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([$grey, $grey, $grey]); - gimp_edit_fill ($text_mask); + gimp_edit_fill ($text_mask, BG_IMAGE_FILL); plug_in_newsprint ($img, $text_mask, $cell_size, 0, 0, 45.0, 3, 45.0, 0, 45.0, 0, 45.0, 0, 3); gimp_image_remove_layer_mask ($img, $text_layer, APPLY); gimp_palette_set_background ($old_bg); @@ -2163,21 +2166,21 @@ sub script_fu_sota_chrome_logo { gimp_image_add_layer ($img, $layer2, 0); gimp_palette_set_background ([255, 255, 255]); gimp_selection_none ($img); - gimp_edit_fill ($layer2); - gimp_edit_fill ($layer3); + gimp_edit_fill ($layer2, BG_IMAGE_FILL); + gimp_edit_fill ($layer3, BG_IMAGE_FILL); gimp_edit_clear ($shadow); gimp_layer_set_visible ($text_layer, 0); gimp_layer_set_visible ($shadow, 0); gimp_rect_select ($img, $b_size / 2, $b_size / 2, ($width - $b_size), ($height - $b_size), REPLACE, 0, 0); gimp_rect_select ($img, $b_size, $b_size, ($width - $b_size * 2), ($height - $b_size * 2), SUB, 0, 0); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); gimp_selection_translate ($img, $offx1, $offy1); gimp_selection_feather ($img, $feather); - gimp_edit_fill ($layer2); + gimp_edit_fill ($layer2, BG_IMAGE_FILL); gimp_selection_translate ($img, 2 * $offx2, 2 * $offy2); - gimp_edit_fill ($layer3); + gimp_edit_fill ($layer3, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_layer_set_visible ($layer2, 1); gimp_layer_set_visible ($layer3, 1); @@ -2197,7 +2200,7 @@ sub script_fu_sota_chrome_logo { gimp_image_add_layer_mask ($img, $layer1, $layer_mask); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($layer_mask); + gimp_edit_fill ($layer_mask, BG_IMAGE_FILL); $layer2 = gimp_layer_copy ($layer1, 1); gimp_image_add_layer ($img, $layer2, 0); gimp_brushes_set_brush (brush ($brush_size)); @@ -2206,7 +2209,7 @@ sub script_fu_sota_chrome_logo { gimp_palette_set_background ([0, 0, 0]); gimp_selection_feather ($img, $feather * 1.5); gimp_selection_translate ($img, 2.5 * $offx1, 2.5 * $offy1); - gimp_edit_fill ($shadow); + gimp_edit_fill ($shadow, BG_IMAGE_FILL); gimp_selection_all ($img); gimp_patterns_set_pattern ("Marble #1"); gimp_bucket_fill ($text_layer, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); @@ -2285,14 +2288,14 @@ sub script_fu_speed_text { gimp_layer_set_edit_mask ($text_layer, 0); gimp_selection_grow ($img, 10); gimp_palette_set_background ($old_fg); - gimp_edit_fill ($text_layer); + gimp_edit_fill ($text_layer, BG_IMAGE_FILL); gimp_layer_set_edit_mask ($text_layer, 1); gimp_selection_load ($saved_sel); gimp_selection_feather ($img, 10); gimp_palette_set_background ([$grey, $grey, $grey]); - gimp_edit_fill ($text_mask); - gimp_edit_fill ($text_mask); - gimp_edit_fill ($text_mask); + gimp_edit_fill ($text_mask, BG_IMAGE_FILL); + gimp_edit_fill ($text_mask, BG_IMAGE_FILL); + gimp_edit_fill ($text_mask, BG_IMAGE_FILL); gimp_selection_clear ($img); plug_in_newsprint ($img, $text_mask, $cell_size, 0, 0, 0.0, 1, 45.0, 0, 45.0, 0, 45.0, 0, 5); gimp_image_remove_layer_mask ($img, $text_layer, APPLY); @@ -2347,7 +2350,7 @@ sub script_fu_starburst_logo { gimp_image_add_layer_mask ($img, $burst_layer, $layer_mask); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_palette_set_background ($bg_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_edit_clear ($shadow_layer); gimp_edit_clear ($burst_layer); gimp_selection_all ($img); @@ -2356,7 +2359,7 @@ sub script_fu_starburst_logo { gimp_selection_none ($img); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($layer_mask); + gimp_edit_fill ($layer_mask, BG_IMAGE_FILL); gimp_selection_none ($img); plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100, 0); gimp_selection_layer_alpha ($text_layer); @@ -2365,7 +2368,7 @@ sub script_fu_starburst_logo { gimp_selection_translate ($img, -1, -1); while ($count < $off) { - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_translate ($img, 1, 1); $count = ($count + 1); } @@ -2476,7 +2479,7 @@ sub script_fu_starscape_logo { gimp_image_add_layer ($img, $shadow_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_edit_clear ($shadow_layer); gimp_edit_clear ($glow_layer); gimp_selection_layer_alpha ($text_layer); @@ -2484,12 +2487,12 @@ sub script_fu_starscape_logo { gimp_selection_feather ($img, $feather); gimp_palette_set_background ($glow_color); gimp_selection_feather ($img, $feather); - gimp_edit_fill ($glow_layer); + gimp_edit_fill ($glow_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_selection_feather ($img, $shadow_feather); gimp_palette_set_background ([0, 0, 0]); gimp_selection_translate ($img, $offx, $offy); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_background ([31, 31, 31]); gimp_palette_set_foreground ([255, 255, 255]); @@ -2553,7 +2556,7 @@ sub script_fu_t_o_p_logo { gimp_edit_clear ($shadow_layer); gimp_edit_clear ($sparkle_layer); gimp_palette_set_background ($base_color); - gimp_edit_fill ($sparkle_layer); + gimp_edit_fill ($sparkle_layer, BG_IMAGE_FILL); gimp_palette_set_background ($base_color); gimp_selection_layer_alpha ($text_layer); $selection = gimp_selection_save ($img); @@ -2587,10 +2590,10 @@ sub script_fu_t_o_p_logo { gimp_palette_set_background ([255, 255, 255]); gimp_brushes_set_brush ("Circle Fuzzy (11)"); gimp_selection_feather ($img, $border); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_palette_set_background ($base_color); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_selection_load ($selection); gimp_brushes_set_brush ("Circle Fuzzy (07)"); gimp_palette_set_foreground ([255, 255, 255]); @@ -2668,16 +2671,16 @@ sub script_fu_textured_logo { gimp_drawable_fill ($shadow_layer, BG_IMAGE_FILL); gimp_rect_select ($img, $b_size_2, $b_size_2, ($width - $b_size), ($height - $b_size), REPLACE, 1, $b_size_2); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($shadow_layer); + gimp_edit_fill ($shadow_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_image_add_layer_mask ($img, $text_shadow_layer, $tsl_layer_mask); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($tsl_layer_mask); + gimp_edit_fill ($tsl_layer_mask, BG_IMAGE_FILL); gimp_selection_feather ($img, $f_size); gimp_palette_set_background ([63, 63, 63]); - gimp_edit_fill ($drop_shadow_layer); + gimp_edit_fill ($drop_shadow_layer, BG_IMAGE_FILL); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($text_shadow_layer); + 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_MODE, SHAPEBURST_ANGULAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, 1, 1); gimp_selection_none ($img); @@ -2692,7 +2695,7 @@ sub script_fu_textured_logo { gimp_selection_layer_alpha ($blend_layer); gimp_image_add_layer_mask ($img, $drop_shadow_layer, $dsl_layer_mask); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($dsl_layer_mask); + gimp_edit_fill ($dsl_layer_mask, BG_IMAGE_FILL); gimp_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY); gimp_selection_none ($img); gimp_layer_set_name ($text_layer, $text); @@ -2753,23 +2756,23 @@ sub script_fu_title_header { gimp_layer_set_offsets ($bumpmap_layer, $text_layers_offset, 0); gimp_layer_set_offsets ($fore_layer, $text_layers_offset, 0); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($bumpmap_layer); + gimp_edit_fill ($bumpmap_layer, BG_IMAGE_FILL); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($bumpmap_layer); + gimp_edit_fill ($bumpmap_layer, BG_IMAGE_FILL); gimp_selection_none ($img); plug_in_gauss_rle ($img, $bumpmap_layer, 4.0, 1, 1); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($fore_layer); + gimp_edit_fill ($fore_layer, BG_IMAGE_FILL); plug_in_bump_map ($img, $fore_layer, $bumpmap_layer, 135.0, 45.0, 4, 0, 0, 0, 0, 0, 0, 0); gimp_layer_set_visible ($text_layer, 1); gimp_layer_set_preserve_trans ($text_layer, 1); gimp_blend ($text_layer, CUSTOM, NORMAL_MODE, LINEAR, 100, 0, REPEAT_NONE, 0, 0.2, 3, $padding, $padding, ($text_width - $padding - 1), ($text_height - $padding - 1)); gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_ellipse_select ($img, 0, 0, $text_height, $text_height, REPLACE, 1, 0, 0); gimp_palette_set_background (gimp_color_picker ($text_layer, $text_layers_offset, 0, 1, 0, 6, 0)); - gimp_edit_fill ($bg_layer); + gimp_edit_fill ($bg_layer, BG_IMAGE_FILL); gimp_rect_select ($img, ($img_width - $fade_width), 0, $fade_width, $text_height, REPLACE, 0, 0); gimp_palette_set_foreground (gimp_palette_get_background ()); gimp_palette_set_background ([0, 0, 0]); diff --git a/plug-ins/perl/examples/miff b/plug-ins/perl/examples/miff index e9db37e142..d6e6867527 100755 --- a/plug-ins/perl/examples/miff +++ b/plug-ins/perl/examples/miff @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # pcg@goof.com # a fairly complete miff save filter diff --git a/plug-ins/perl/examples/mirrorsplit b/plug-ins/perl/examples/mirrorsplit index b99a879320..490f923b69 100755 --- a/plug-ins/perl/examples/mirrorsplit +++ b/plug-ins/perl/examples/mirrorsplit @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; diff --git a/plug-ins/perl/examples/parasite-editor b/plug-ins/perl/examples/parasite-editor index 18dc6afce2..188f412a65 100755 --- a/plug-ins/perl/examples/parasite-editor +++ b/plug-ins/perl/examples/parasite-editor @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell #BEGIN {$^W=1}; diff --git a/plug-ins/perl/examples/perlcc b/plug-ins/perl/examples/perlcc index b4da654a84..d0814243d8 100755 --- a/plug-ins/perl/examples/perlcc +++ b/plug-ins/perl/examples/perlcc @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp ('__','N_'); use Gimp::Feature; diff --git a/plug-ins/perl/examples/perlotine b/plug-ins/perl/examples/perlotine index 6244692ed6..d250426b0c 100755 --- a/plug-ins/perl/examples/perlotine +++ b/plug-ins/perl/examples/perlotine @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # This is tigert's request. I suppose it'll be useful to those that do diff --git a/plug-ins/perl/examples/prep4gif b/plug-ins/perl/examples/prep4gif index ccd23a8ef5..0dc16c7b21 100755 --- a/plug-ins/perl/examples/prep4gif +++ b/plug-ins/perl/examples/prep4gif @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto N_ __); use Gimp::Fu; diff --git a/plug-ins/perl/examples/randomart1 b/plug-ins/perl/examples/randomart1 index 604978bab0..56cf1ceae6 100755 --- a/plug-ins/perl/examples/randomart1 +++ b/plug-ins/perl/examples/randomart1 @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp; use Gimp::Fu; diff --git a/plug-ins/perl/examples/randomblends b/plug-ins/perl/examples/randomblends index eaa225c9fc..41e40adefa 100755 --- a/plug-ins/perl/examples/randomblends +++ b/plug-ins/perl/examples/randomblends @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # This is adrian's idea - take random blends and difference them. You're # bound to come up w/ something cool eventually. diff --git a/plug-ins/perl/examples/repdup b/plug-ins/perl/examples/repdup index 6199c1daf3..ed365bf76e 100755 --- a/plug-ins/perl/examples/repdup +++ b/plug-ins/perl/examples/repdup @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; diff --git a/plug-ins/perl/examples/roundrectsel b/plug-ins/perl/examples/roundrectsel index c166f84598..f82d3aa7cf 100755 --- a/plug-ins/perl/examples/roundrectsel +++ b/plug-ins/perl/examples/roundrectsel @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # This is adrian's idea - take random blends and difference them. You're # bound to come up w/ something cool eventually. diff --git a/plug-ins/perl/examples/roundsel b/plug-ins/perl/examples/roundsel index de326d2a79..392f9ec371 100755 --- a/plug-ins/perl/examples/roundsel +++ b/plug-ins/perl/examples/roundsel @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # Use gaussian blur and levels to round selection corners use Gimp qw(:auto __ N_); diff --git a/plug-ins/perl/examples/scratches b/plug-ins/perl/examples/scratches index 80b43a3a15..574fad2f62 100755 --- a/plug-ins/perl/examples/scratches +++ b/plug-ins/perl/examples/scratches @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp; use Gimp::Fu; diff --git a/plug-ins/perl/examples/sethspin b/plug-ins/perl/examples/sethspin index 5d91cf5b0d..380da8c2df 100755 --- a/plug-ins/perl/examples/sethspin +++ b/plug-ins/perl/examples/sethspin @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # Note: Seth has transferred the maintainer `position' to me, so bother me diff --git a/plug-ins/perl/examples/stampify b/plug-ins/perl/examples/stampify index cbf2ba0fac..ac5d6ec7f2 100755 --- a/plug-ins/perl/examples/stampify +++ b/plug-ins/perl/examples/stampify @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; @@ -52,7 +55,7 @@ register "stampify", $pos = $pos + $diameter + $gap; } gimp_palette_set_background($hole); - gimp_edit_fill($layer1); + gimp_edit_fill($layer1, BG_IMAGE_FILL); gimp_selection_none($img2); # here comes the clever part! :-) # offset horis and vert holes by half the diameter diff --git a/plug-ins/perl/examples/stamps b/plug-ins/perl/examples/stamps index a6c7d12195..30563560c0 100755 --- a/plug-ins/perl/examples/stamps +++ b/plug-ins/perl/examples/stamps @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; @@ -13,7 +16,7 @@ sub stamps { $layer = gimp_layer_new($img, $size, $size, RGB_IMAGE, "Layer 1", 100, NORMAL_MODE); gimp_image_add_layer($layer, -1); gimp_palette_set_background($hole); - $layer->gimp_edit_fill; + $layer->gimp_edit_fill(BG_IMAGE_FILL); gimp_selection_none($img); my $ncircles = int(($size + $gap) / ($diameter + $gap)); @@ -30,7 +33,7 @@ sub stamps { $x = $x + $diameter + $gap; } gimp_palette_set_background($paper); - gimp_edit_fill($layer); + gimp_edit_fill($layer, BG_IMAGE_FILL); gimp_selection_none($img); # here, at last, comes the clever part! :-) diff --git a/plug-ins/perl/examples/terral_text b/plug-ins/perl/examples/terral_text index f3e976a970..9dc451bbed 100644 --- a/plug-ins/perl/examples/terral_text +++ b/plug-ins/perl/examples/terral_text @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # Terral Text # by Seth Burgess @@ -68,7 +71,7 @@ sub { "TextLayer", 100, 0); $img->add_layer($textlayer,1); palette_set_background([255,255,255]); - $textlayer->edit_fill(); + $textlayer->edit_fill(BG_IMAGE_FILL); palette_set_foreground([0,0,0]); # Place centered Text - what a PITA! diff --git a/plug-ins/perl/examples/tex-to-float b/plug-ins/perl/examples/tex-to-float index 4e626194c1..2d44496944 100755 --- a/plug-ins/perl/examples/tex-to-float +++ b/plug-ins/perl/examples/tex-to-float @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell ###################################################################### # A Perl::Fu plugin for converting TeX strings to floating layers. # @@ -116,13 +119,13 @@ sub grey_file_to_float { gimp_floating_sel_anchor($floating_layer); gimp_invert($mask); gimp_palette_set_background(gimp_palette_get_foreground()); - gimp_edit_fill($grey_layer); + gimp_edit_fill($grey_layer, BG_IMAGE_FILL); gimp_image_remove_layer_mask($grey_img, $grey_layer, 0); # Now copy this layer to $img 1 gimp_edit_copy($grey_layer); $floating_layer = gimp_edit_paste($drw1, 0); - gimp_edit_fill($floating_layer); + gimp_edit_fill($floating_layer, BG_IMAGE_FILL); print STDERR "Yohoo!\n"; cleanup(); diff --git a/plug-ins/perl/examples/translogo b/plug-ins/perl/examples/translogo index 29107c88bf..e5b2dc7443 100755 --- a/plug-ins/perl/examples/translogo +++ b/plug-ins/perl/examples/translogo @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; @@ -28,7 +31,7 @@ sub my_code { gimp_selection_layer_alpha ($layer); gimp_selection_invert ($img); gimp_palette_set_background ([255, 255, 255]); - gimp_edit_fill ($layer); + gimp_edit_fill ($layer, BG_IMAGE_FILL); gimp_selection_none ($img); gimp_invert ($layer); plug_in_gauss_rle ($layer, 2.0, 1, 1); @@ -41,7 +44,7 @@ sub my_code { gimp_bucket_fill ($bump_lay, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); } else { gimp_palette_set_background ($txt_col); - gimp_edit_fill ($bump_lay); + gimp_edit_fill ($bump_lay, BG_IMAGE_FILL); } plug_in_bump_map ($img, $bump_lay, $layer, 110.0, 45.0, 4, 0, 0, 0, 0, 1, 0, 0); $pattern_mask = gimp_layer_create_mask ($bump_lay, ALPHA_MASK); diff --git a/plug-ins/perl/examples/triangle b/plug-ins/perl/examples/triangle index 2a730783da..6e13cb639f 100755 --- a/plug-ins/perl/examples/triangle +++ b/plug-ins/perl/examples/triangle @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp qw(:auto __ N_); use Gimp::Fu; diff --git a/plug-ins/perl/examples/webify b/plug-ins/perl/examples/webify index 981d97e756..ec69a5debc 100755 --- a/plug-ins/perl/examples/webify +++ b/plug-ins/perl/examples/webify @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell use Gimp; use Gimp::Fu; diff --git a/plug-ins/perl/examples/windify b/plug-ins/perl/examples/windify index 07fd13de5a..ff99977010 100755 --- a/plug-ins/perl/examples/windify +++ b/plug-ins/perl/examples/windify @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # sent to me by Seth Burgess # small changes my Marc Lehmann diff --git a/plug-ins/perl/examples/xachlego b/plug-ins/perl/examples/xachlego index 0444588e3d..296d879e87 100755 --- a/plug-ins/perl/examples/xachlego +++ b/plug-ins/perl/examples/xachlego @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # This is (hopefully) a demonstration of how pathetically easy it is to script # a neato effect you've come up with. This lil' effect was created by xach, # and translated by sjburges (me). You can consider it released under the GPL @@ -70,7 +73,7 @@ register "xach_blocks", $img->selection_all; gimp_edit_clear($gridlayer); gimp_palette_set_background([255,255,255]); - gimp_edit_fill($gridlayer); + gimp_edit_fill($gridlayer, BG_IMAGE_FILL); $gridlayer->plug_in_grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0); $gridlayer->plug_in_gauss_iir(0.7*$blocksize, 1, 1); @@ -92,7 +95,7 @@ register "xach_blocks", $cleangrid = $img->layer_new($img->width, $img->height, RGBA_IMAGE, "Grid 2", 100, 0); $img->add_layer($cleangrid,0); - gimp_edit_fill($cleangrid); + gimp_edit_fill($cleangrid, BG_IMAGE_FILL); $cleangrid->plug_in_grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0); gimp_selection_load($selection); $drawable->plug_in_bump_map($cleangrid, 135, 45, 3, 0, 0, 0, 0, 1, 0, 0); diff --git a/plug-ins/perl/examples/xachshadow b/plug-ins/perl/examples/xachshadow index 9f1785f794..f87d97df77 100755 --- a/plug-ins/perl/examples/xachshadow +++ b/plug-ins/perl/examples/xachshadow @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0; # not running under some shell @@ -72,7 +75,7 @@ register "xach_shadows", $img->selection_all; gimp_edit_clear($gridlayer); gimp_palette_set_background([255,255,255]); - gimp_edit_fill($gridlayer); + gimp_edit_fill($gridlayer, BG_IMAGE_FILL); $gridlayer->plug_in_grid((1, $blocksize, 0, [0,0,0], 255) x 3); gimp_layer_set_mode($gridlayer, 3); diff --git a/plug-ins/perl/examples/xachvision b/plug-ins/perl/examples/xachvision index ce09ab1638..9a44a7a6ec 100755 --- a/plug-ins/perl/examples/xachvision +++ b/plug-ins/perl/examples/xachvision @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # Once again, an effect of Xach's # Created by Seth Burgess @@ -31,11 +34,11 @@ register "xachvision", $img->add_layer($toplayer, 0); gimp_palette_set_background($color); - $toplayer->edit_fill(); + $toplayer->edit_fill(BG_IMAGE_FILL); $toplayer->set_mode(COLOR_MODE); gimp_palette_set_background([0,0,0]); - $drawable->edit_fill(); + $drawable->edit_fill(BG_IMAGE_FILL); $amt = $amt/255; $midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt); diff --git a/plug-ins/perl/examples/yinyang b/plug-ins/perl/examples/yinyang index 55b3b3cf4b..89692ef389 100755 --- a/plug-ins/perl/examples/yinyang +++ b/plug-ins/perl/examples/yinyang @@ -1,4 +1,7 @@ -#!/usr/bin/perl +#!/usr/app/bin/perl + +eval 'exec /usr/app/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell # # Gimp yin/yang symbol plugin for The Gimp. Extract documentation by running # "perldoc" on this plugin, or by using the pod utilities (pod2man, pod2html, diff --git a/plug-ins/perl/pxgettext b/plug-ins/perl/pxgettext index 4f7fca220c..4d45af3c55 100755 --- a/plug-ins/perl/pxgettext +++ b/plug-ins/perl/pxgettext @@ -3,6 +3,11 @@ # a lame attempt at xgettext for perl # line line numbers, yet +# 5.005_02 in particular seems to have a BIG BUG +# resulting in an endless loop and a memory leak in the +# regex machinery :( +exit 1 unless $] > 5.005_03; + undef $/; print <<'EOF'; diff --git a/plug-ins/perl/scm2scm b/plug-ins/perl/scm2scm index d29b5485e8..d8f54c00e2 100755 --- a/plug-ins/perl/scm2scm +++ b/plug-ins/perl/scm2scm @@ -167,7 +167,7 @@ sub parse() { if ($word eq "(") { my $t = $tok; get; my @t = &parse; - $word eq ")" or die "missing right paranthese (got $word)\n"; + $word eq ")" or die "missing right parenthesis (got $word)\n"; push(@toks,[$t,@t,$tok]); get; } elsif ($word eq ")") { $depth--;