From e802d2c49293e61276b619980f06ea709b2c9d5b Mon Sep 17 00:00:00 2001 From: Marc Lehmann Date: Mon, 20 Dec 1999 20:02:20 +0000 Subject: [PATCH] see plug-ins/perl/Changes --- plug-ins/perl/Changes | 4 + plug-ins/perl/Gimp/Lib.xs | 2 +- plug-ins/perl/MANIFEST | 34 +- plug-ins/perl/TODO | 21 +- plug-ins/perl/UI/UI.pm | 3 +- plug-ins/perl/configure | 69 +- plug-ins/perl/configure.in | 17 +- plug-ins/perl/examples/alpha2color | 113 ++ plug-ins/perl/examples/blowinout | 109 ++ plug-ins/perl/examples/border | 89 ++ plug-ins/perl/examples/ditherize | 77 ++ plug-ins/perl/examples/example-fu | 70 ++ plug-ins/perl/examples/example-net | 32 + plug-ins/perl/examples/example-oo | 37 + plug-ins/perl/examples/feedback | 41 + plug-ins/perl/examples/homepage-logo | 151 +++ plug-ins/perl/examples/logulator | 545 ++++---- plug-ins/perl/examples/perlcc | 2 +- plug-ins/perl/examples/prep4gif | 109 ++ plug-ins/perl/examples/scratches | 59 + plug-ins/perl/examples/view3d | 37 + plug-ins/perl/examples/webify | 47 + plug-ins/perl/examples/windify | 65 + plug-ins/perl/examples/xachlego | 119 ++ plug-ins/perl/examples/xachshadow | 87 ++ plug-ins/perl/examples/xachvision | 54 + plug-ins/perl/po/it.po | 1704 +++++++++++++------------- plug-ins/perl/scm2perl | 6 +- 28 files changed, 2566 insertions(+), 1137 deletions(-) create mode 100755 plug-ins/perl/examples/alpha2color create mode 100755 plug-ins/perl/examples/blowinout create mode 100755 plug-ins/perl/examples/border create mode 100755 plug-ins/perl/examples/ditherize create mode 100755 plug-ins/perl/examples/example-fu create mode 100755 plug-ins/perl/examples/example-net create mode 100644 plug-ins/perl/examples/example-oo create mode 100755 plug-ins/perl/examples/feedback create mode 100644 plug-ins/perl/examples/homepage-logo create mode 100755 plug-ins/perl/examples/prep4gif create mode 100755 plug-ins/perl/examples/scratches create mode 100755 plug-ins/perl/examples/view3d create mode 100755 plug-ins/perl/examples/webify create mode 100755 plug-ins/perl/examples/windify create mode 100755 plug-ins/perl/examples/xachlego create mode 100755 plug-ins/perl/examples/xachshadow create mode 100755 plug-ins/perl/examples/xachvision diff --git a/plug-ins/perl/Changes b/plug-ins/perl/Changes index b1c1d11ce6..53c5938941 100644 --- a/plug-ins/perl/Changes +++ b/plug-ins/perl/Changes @@ -34,6 +34,10 @@ Revision history for Gimp-Perl extension. - use XSLoader instead of DynaLoader where available. - use perl_require_pv instead of perl_eval_pv. - updated COPYING.GNU to version 2. + - removed .pl suffix from all examples. + - deprecate use of included scripts with gimp-1.0 in configure.in. + - fix the ColorSelectButton ro work with newer versions of Gtk. + - updated logulator from scheme sources. oh yeah :( 1.17 Wed Nov 24 21:25:19 CET 1999 - re-fitted i18n translation for most plug-ins. diff --git a/plug-ins/perl/Gimp/Lib.xs b/plug-ins/perl/Gimp/Lib.xs index 412e2cefa2..d80b909655 100644 --- a/plug-ins/perl/Gimp/Lib.xs +++ b/plug-ins/perl/Gimp/Lib.xs @@ -460,7 +460,7 @@ dump_params (int nparams, GParam *args, GParamDef *params) case PARAM_INT16: trace_printf ("%d", args[i].data.d_int16); break; case PARAM_INT8: trace_printf ("%d", (guint8) args[i].data.d_int8); break; case PARAM_FLOAT: trace_printf ("%f", args[i].data.d_float); break; - case PARAM_STRING: trace_printf ("\"%s\"", args[i].data.d_string); break; + case PARAM_STRING: trace_printf ("\"%s\"", args[i].data.d_string ? args[i].data.d_string : "[null]"); break; case PARAM_DISPLAY: trace_printf ("%d", args[i].data.d_display); break; case PARAM_IMAGE: trace_printf ("%d", args[i].data.d_image); break; case PARAM_LAYER: trace_printf ("%d", args[i].data.d_layer); break; diff --git a/plug-ins/perl/MANIFEST b/plug-ins/perl/MANIFEST index bd66cb6e76..cf42673d22 100644 --- a/plug-ins/perl/MANIFEST +++ b/plug-ins/perl/MANIFEST @@ -58,30 +58,30 @@ UI/UI.pm UI/UI.xs UI/basewidget.pm examples/PDB -examples/alpha2color.pl +examples/alpha2color examples/tex-to-float examples/README -examples/webify.pl -examples/border.pl +examples/webify +examples/border examples/Create_Images examples/image_list -examples/example-oo.pl -examples/example-fu.pl -examples/example-net.pl +examples/example-oo +examples/example-fu +examples/example-net examples/gimp-make-img-map -examples/homepage-logo.pl -examples/windify.pl -examples/prep4gif.pl -examples/ditherize.pl -examples/view3d.pl -examples/feedback.pl -examples/xachlego.pl -examples/xachshadow.pl +examples/homepage-logo +examples/windify +examples/prep4gif +examples/ditherize +examples/view3d +examples/feedback +examples/xachlego +examples/xachshadow examples/parasite-editor -examples/scratches.pl -examples/blowinout.pl +examples/scratches +examples/blowinout examples/terral_text -examples/xachvision.pl +examples/xachvision examples/gimpmagick examples/perlcc examples/animate_cells diff --git a/plug-ins/perl/TODO b/plug-ins/perl/TODO index 658f4b3661..143d4d2cae 100644 --- a/plug-ins/perl/TODO +++ b/plug-ins/perl/TODO @@ -21,10 +21,15 @@ API generalization firetext! AND _grayscale_ for map_gradient(!) bugs - * make test should not be run without DISPLAY + * gimp_layer_set_name(4, "(null)") = gimp: fatal error: sigsegv caught + gimp (pid:27638): [E]xit, [H]alt, show [S]tack trace or [P]roceed: + this should not crash the gimp itself, but rather gimp-perl (or libc). +[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! - * update logulator +[DONE] * update logulator * on-query => remove gimp::fu parasite(?) * bricks requires disable for pattern(?) * better default argument-handlign via a "massage_args" callback from Gimp/UI/interact? @@ -33,20 +38,14 @@ bugs * scroll behaviour, use clist instead of list? * document Gimp::PDL and rect2, ...2 functions! * Kommandozeilenmodus(!). (???) -[DONE] * KILL :auto from default(!) - * auto-flush of gdrawable when merge_shadow(?) +[KILL] * auto-flush of gdrawable when merge_shadow(?) * gimp-piddle must be written back automatically on destroy, if changed * gimp-tile set dirty automatically(!) -[KILL] * perl module install dependency -[KILL] * $Config{cc} might not understand Gimps CFLAGS (-mpentium). -[KILL] * wait for working gimp_file_load (or do it myself?) - * get rid of xs_exit. please please fuck me plenty. +[KILL] * get rid of xs_exit. please please fuck me plenty. * create gimpstyle.pod important issues -[DONE] * improve PDB explorer -[DONE] * input image arguments * 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) @@ -66,11 +65,9 @@ important issues * Gimp::ping * allow plug-ins to register with only a drawable argument(!) * gradient button -[KILL] * implement Perl-Server RSET and shared lock(!) * weighted movement in drawing tools * --function localfunc to select one of the registered scripts * create working progress when Net and $verbose -[KILL] * Gimp::Fu::command(?) * default parameters at end(!) * try to deduce default parameters diff --git a/plug-ins/perl/UI/UI.pm b/plug-ins/perl/UI/UI.pm index 7ebfa6bb25..15dacfaed6 100644 --- a/plug-ins/perl/UI/UI.pm +++ b/plug-ins/perl/UI/UI.pm @@ -322,6 +322,7 @@ sub GTK_CLASS_INIT { sub GTK_OBJECT_INIT { my (@color) = @class_def_color; + shift unless ref $_[0]; my($color_button) = @_; $color_button->{_color} ||= [@color]; @@ -411,8 +412,6 @@ sub cb_color_button { $color_button->{_cs_window} = $cs_window; } -1; - package Gimp::UI; sub logo { diff --git a/plug-ins/perl/configure b/plug-ins/perl/configure index 608afbe862..b86a95db24 100755 --- a/plug-ins/perl/configure +++ b/plug-ins/perl/configure @@ -858,7 +858,7 @@ rm -f conftest* GIMP_LIBS="" GIMP_CFLAGS_NOUI="" GIMP_LIBS_NOUI="" - { echo "configure: error: ** unable to find gimp" 1>&2; exit 1; } + echo "configure: warning: ** unable to find gimp" 1>&2 fi @@ -867,6 +867,21 @@ rm -f conftest* rm -f conf.gimptest +gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` +gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + +if test $gimptool_major_version -lt 2 && test $gimptool_minor_version -lt 1 ; then + echo + echo '** you are using a too old version of gimp (this includes all _stable_' + echo '** 1.0.x versions!). While this plug-in should still compile with the' + echo '** released 1.0.x versions of the gimp, many scripts will not, since they' + echo '** already use the new API.' + echo +fi + + # Check whether --with-glib-prefix or --without-glib-prefix was given. if test "${with_glib_prefix+set}" = set; then withval="$with_glib_prefix" @@ -920,7 +935,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:924: checking for $ac_word" >&5 +echo "configure:939: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -955,7 +970,7 @@ fi min_glib_version=1.2.0 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:959: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:974: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -978,7 +993,7 @@ echo "configure:959: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -1054,7 +1069,7 @@ main () } EOF -if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1088,7 +1103,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -1098,7 +1113,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:1102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" @@ -1140,7 +1155,7 @@ rm -f conftest* ac_gimp_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $GIMP_CFLAGS" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1144: checking how to run the C preprocessor" >&5 +echo "configure:1159: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1155,13 +1170,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1172,13 +1187,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1189,13 +1204,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1220,7 +1235,7 @@ fi echo "$ac_t""$CPP" 1>&6 cat > conftest.$ac_ext < EOF @@ -1238,17 +1253,17 @@ for ac_hdr in libgimp/gimpmodule.h libintl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1242: checking for $ac_hdr" >&5 +echo "configure:1257: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1280,17 +1295,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1284: checking for $ac_hdr" >&5 +echo "configure:1299: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1322,12 +1337,12 @@ CONFIG_H="config.h" for ac_func in vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1326: checking for $ac_func" >&5 +echo "configure:1341: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1406,12 +1421,12 @@ fi for ac_func in _exit do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1410: checking for $ac_func" >&5 +echo "configure:1425: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/plug-ins/perl/configure.in b/plug-ins/perl/configure.in index bc3bc6d8e6..52a2fdefb6 100644 --- a/plug-ins/perl/configure.in +++ b/plug-ins/perl/configure.in @@ -30,11 +30,26 @@ AC_ARG_WITH(libs, [ --with-libs=DIR Additionally search for librarie AC_PATH_PROGS(GIMP,gimp) -AM_PATH_GIMP(1.0.4,, AC_MSG_ERROR( +AM_PATH_GIMP(1.0.4,, AC_MSG_WARN( ** unable to find gimp, make sure it's in your path (version 1.0.4+ required!) ** You can get the gimp from ftp://ftp.gimp.org/pub/gimp. )) +gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + +if test $gimptool_major_version -lt 2 && test $gimptool_minor_version -lt 1 ; then + echo + echo '** you are using a too old version of gimp (this includes all _stable_' + echo '** 1.0.x versions!). While this plug-in should still compile with the' + echo '** released 1.0.x versions of the gimp, many scripts will not, since they' + echo '** already use the new API.' + echo +fi + + AM_PATH_GLIB(1.2.0,, AC_MSG_ERROR( ** unable to find glib, make sure it's in your path (version 1.2.0+ required!) ** You can get glib from ftp://ftp.gtk.org/pub/glib. diff --git a/plug-ins/perl/examples/alpha2color b/plug-ins/perl/examples/alpha2color new file mode 100755 index 0000000000..01ea1eec9f --- /dev/null +++ b/plug-ins/perl/examples/alpha2color @@ -0,0 +1,113 @@ +#!/usr/bin/perl + +use Gimp qw( :auto N_ ); +use Gimp::Fu; + +# alpha2color.pl +# by Seth Burgess +# Version 0.02 +# Oct 16th, 1998 +# +# This script simply changes the current alpha channel to a given color +# instead. I'm writing it primarily for use with the displace plugin, +# but I imagine it'll have other uses. + +# TODO: Selection is currently ignored. It'd be better if it remembered +# what the previous selection was. + +# Gimp::set_trace(TRACE_ALL); + +# Revision History +# v0.02 - fixed up @color (should be $color) and undef; (should be return();) + +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++; + } + } + + + +sub alpha2col { + my ($img, $drawable, $color) = @_; + + my $oldcolor = gimp_palette_get_background(); + + my @layers = gimp_image_get_layers($img); + +# 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; + } + +# Hide the bottom layer, so it doesn't get into the merge visible later. + + @layer_visibilities = save_layers_state ($img); + # foreach $visible (@layer_visibilities) { + # print $visible, "\n"; + # } + $target_layer = gimp_image_get_active_layer($img); + @offsets=$target_layer->offsets; + # print $target_layer, "\n"; + foreach $eachlay (@layers) { + $eachlay->set_visible(0); + } + $target_layer->set_visible(1); + gimp_palette_set_background($color); + $newlay = $target_layer->copy(1); + $img->add_layer($newlay, 0); + $newlay->set_offsets(@offsets); + $target_layer->set_active_layer; + + $img->selection_all; + $target_layer->edit_fill; + $img->selection_none; + + $foreground = gimp_image_merge_visible_layers($img,0); + + restore_layers_state($img, @layer_visibilities); + + gimp_palette_set_background($oldcolor); + gimp_displays_flush(); + return(); + } + +register + "plug_in_alpha2color", + "Alpha 2 Color", + "Change the current alpha to a selected color.", + "Seth Burgess", + "Seth Burgess", + "2-15-98", + N_"/Image/Alpha/Alpha2Color...", + "RGBA", + [ + [PF_COLOR, "color", "Color for current alpha", [127,127,127]] + ], + \&alpha2col; + +exit main; + diff --git a/plug-ins/perl/examples/blowinout b/plug-ins/perl/examples/blowinout new file mode 100755 index 0000000000..2fd1f5a289 --- /dev/null +++ b/plug-ins/perl/examples/blowinout @@ -0,0 +1,109 @@ +#!/usr/bin/perl + +# Blow In/Out +# John Pitney + +use Gimp 1.06; +use Gimp::Fu; + +# print "hello there\n"; + +# Gimp::set_trace(TRACE_CALL); + + +sub blowinout { + my ($img, $drawable, $angle, $nsteps, $distance, $inmode, $arithmode) = @_; + # bail out if $drawable isn't a layer +# print "Starting\n"; + if( gimp_selection_is_empty($img) == 0) { return }; +# if ($nsteps == 0) return; + eval { $img->undo_push_group_start }; + # save the background color for later restoration + my $oldbg = gimp_palette_get_background(); + #get the drawable dimensions + my $xsize = gimp_drawable_width($drawable); + my $ysize = gimp_drawable_height($drawable); + + # Set background color to 128, for clearing dm + gimp_palette_set_background([128,128,128]); + + # Create a grayscale workspace image for displacement map + my $dm = gimp_image_new($xsize, $ysize, 1); + eval { $dm->undo_push_group_start }; + # It needs to have 2 layers + my $dmlayer = gimp_layer_new($dm, $xsize, $ysize, GRAY_IMAGE, "newlayer", + 100, NORMAL_MODE); + gimp_image_add_layer($dm, $dmlayer, 0); + + # Create the layers, one-by-one + my $i = 1; + my $xdist = ($arithmode) ? + $i * $distance / $nsteps * -cos($angle * 3.14159 / 180) : + $distance ** ($i/$nsteps) * -cos($angle * 3.14159 / 180); + my $ydist = ($arithmode) ? + $i * $distance / $nsteps * sin($angle * 3.14159 / 180) : + $distance ** ($i/$nsteps) * sin($angle * 3.14159 / 180); + gimp_edit_clear($dmlayer); + plug_in_noisify(1, $dm, $dmlayer, 0, 255, 255, 255, 0); + gimp_levels($dmlayer, 0, 0, 255, 1.0, 128, 255); + $drawable = gimp_layer_copy($drawable, 0); + gimp_image_add_layer($img, $drawable, -1); + plug_in_displace(1, $img, $drawable, $xdist, $ydist, 1, 1, $dmlayer, + $dmlayer, 1); + if ( $inmode == 1 ) + { + gimp_image_lower_layer($img, $drawable); + }; + for ( $i = 2; $i <= $nsteps; $i++ ) { + $xdist = ($arithmode) ? + $i * $distance / $nsteps * -cos($angle * 3.14159 / 180) : + $distance ** ($i/$nsteps) * -cos($angle * 3.14159 / 180); + $ydist = ($arithmode) ? + $i * $distance / $nsteps * sin($angle * 3.14159 / 180) : + $distance ** ($i/$nsteps) * sin($angle * 3.14159 / 180); + gimp_edit_clear($dmlayer); + plug_in_noisify(1, $dm, $dmlayer, 0, 255, 255, 255, 0); + gimp_levels($dmlayer, 0, 0, 255, 1.0, 128, 255); + $drawable = gimp_layer_copy($drawable, 0); + gimp_image_add_layer($img, $drawable, -1); + plug_in_displace(1, $img, $drawable, $xdist, $ydist, 1, 1, $dmlayer, + $dmlayer, 1); + if ( $inmode == 1 ) + { + gimp_image_lower_layer($img, $drawable); + }; + } + + eval { $dm->undo_push_group_end }; +# gimp_image_remove_layer($dm, $dmlayer); +# gimp_image_delete ($dm); + gimp_palette_set_background($oldbg); + eval { $img->undo_push_group_end }; +# gimp_displays_flush(); unneccessary (and dangerous ;) + + (); # I like smileys ;) +} + +register + "blowinout", + "Blow selected layer inout", + "Generates an animation thats blows the selected layer in or out", + "John Pitney", + "John Pitney ", + "1999-03-15", + N_"/Filters/Distorts/BlowInOut", + "*", + [ + [PF_INT32, "angle", "Wind Angle, 0 is left", 120], + [PF_INT32, "steps", "Number of Steps/Layers", 5], + [PF_VALUE, "distance", "How far to blow",30], +# What I really need here are radio buttons! Maybe they even exist... +# You wanted them... + [PF_RADIO, "direction", "Blow direction", 0, [In => 1, Out => 0]], + [PF_RADIO, "series", "Kind of series", 1, [Arithmetic => 1, Geometric => 0]] + ], + [], + \&blowinout; + +exit main; + diff --git a/plug-ins/perl/examples/border b/plug-ins/perl/examples/border new file mode 100755 index 0000000000..8285dade68 --- /dev/null +++ b/plug-ins/perl/examples/border @@ -0,0 +1,89 @@ +#!/usr/bin/perl + +#BEGIN {$^W=1}; + +use Gimp::Feature qw(pdl); +use Gimp; +use Gimp::Fu; +use PDL::LiteF; + +# Gimp::set_trace(TRACE_ALL); + +register "border_average", + "calculates the average border colour", + "calulcates the average border colour", + "Marc Lehmann", + "Marc Lehmann", + "0.2.2", + N_"/Filters/Misc/Border Average", + "RGB", + [ + [PF_INT32, "thickness", "Border size to take in count", 10], + [PF_INT32, "bucket_exponent", "Bits for bucket size (default=4: 16 Levels)", 4], + ], + [ + [PF_COLOUR, "border_colour", "Average Border Colour"], + ], + sub { # es folgt das eigentliche Skript... + my($image,$drawable,$thickness,$exponent)=@_; + + ($empty,@bounds)=$drawable->mask_bounds(); + return () if $empty; + + my $rexpo = 8-$exponent; + my $bucket_num = 1<<$exponent; + + # ideally, we'd use a three-dimensional array, but index3 isn't + # implemented yet, so we do it flat (Still its nicer than C). + my $cube = zeroes long,$bucket_num**3; + + my $width = $drawable->width; + my $height = $drawable->height; + + $thickness=$width if $thickness>$width; + $thickness=$height if $thickness>$height; + + local *add_new_colour = sub($) { + # linearize and quantize pixels (same as original, slightly wrong) + my $pixels = $_[0] >> $rexpo; + + # intead of something like + # $cube->index3d($pixels)++; + # we have to first flatten the rgb triples into indexes and use index instead + + my $flatten = long([$bucket_num**2,$bucket_num**1,$bucket_num**0]); + my $subcube = $cube->index(inner($pixels,$flatten)->clump(2)); + + $subcube++; + }; + + Gimp->progress_init("Border Average", 0); + add_new_colour ($drawable->pixel_rgn ($bounds[0] ,$bounds[1] , $thickness,$height, 0, 0) + ->get_rect(0,0, $thickness,$height)); + add_new_colour ($drawable->pixel_rgn ($bounds[2]-$thickness,$bounds[1] , $thickness,$height, 0, 0) + ->get_rect(0,0, $thickness,$height)); + add_new_colour ($drawable->pixel_rgn ($bounds[0] ,$bounds[1] , $width ,$thickness, 0, 0) + ->get_rect(0,0, $width, $thickness)); + add_new_colour ($drawable->pixel_rgn ($bounds[0] ,$bounds[3]-$thickness, $width ,$thickness, 0, 0) + ->get_rect(0,0, $width, $thickness)); + + # now find the colour + my $max = $cube->maximum_ind; + my $b = $max % $bucket_num << $rexpo; + my $g = ($max >>= $exponent) % $bucket_num << $rexpo; + my $r = ($max >>= $exponent) % $bucket_num << $rexpo; + + if ($Gimp::Fu::run_mode != RUN_NONINTERACTIVE) + { + 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; + Gimp->message("Added layer with border colour ($r,$g,$b) on top"); + } + + [$r,$g,$b]; +}; + +exit main; + diff --git a/plug-ins/perl/examples/ditherize b/plug-ins/perl/examples/ditherize new file mode 100755 index 0000000000..194377e772 --- /dev/null +++ b/plug-ins/perl/examples/ditherize @@ -0,0 +1,77 @@ +#!/usr/bin/perl + +use strict 'subs'; +use Gimp; +use Gimp::Fu; + +# +# this is quite convoluted, but I found no other way to do this than: +# +# create a new image & one layer +# copy & paste the layer +# ditherize new image +# copy & paste back +# + +#Gimp::set_trace(TRACE_ALL); + +my %imagetype2layertype = ( + RGB, RGB_IMAGE, + GRAY, GRAY_IMAGE, + INDEXED, INDEXED_IMAGE, +); + +register "plug_in_ditherize", + "dithers current selection", + "This script takes the current selection and dithers it just like convert to indexed", + "Marc Lehmann", + "Marc Lehmann", + "1.2", + N_"/Filters/Noise/Ditherize", + "RGB*, GRAY*", + [ + [PF_RADIO, "dither_type", "The dither type (see gimp_convert_indexed)", 1, + [none => 0, fs => 1, "fs/low-bleed" => 2, ordered => 3]], + [PF_SLIDER, "colours", "The number of colours to dither to", 10, [0, 256, 1, 1]], + ], + sub { + my($image,$drawable,$dither,$colours)=@_; + + Gimp::set_trace(-1); + + $drawable->is_layer or die "this plug-in only works for layers"; + + $image->undo_push_group_start; + + # make sure something is selected + $drawable->mask_bounds or $image->selection_all; + + my ($x1,$y1,$x2,$y2)=($drawable->mask_bounds)[1..4]; + my ($w,$h)=($x2-$x1,$y2-$y1); + + my $sel = $image->selection_save; + $image->rect_select($x1,$y1,$w,$h,REPLACE,0,0); + $drawable->edit_copy; + $sel->selection_load; + $sel->remove_channel; + + my $copy = new Image($w, $h, $image->base_type); + $copy->undo_disable; + my $draw = new Layer($copy, $w, $h, + $imagetype2layertype{$image->base_type}, + "temporary layer", 100, NORMAL_MODE); + $copy->add_layer ($draw, 1); + $draw->edit_paste(0)->anchor; + $copy->convert_indexed ($dither, MAKE_PALETTE, $colours, 1, 1, ""); + + $draw->edit_copy; + $drawable->edit_paste(1)->anchor; + $copy->delete; + + $image->undo_push_group_end; + + (); +}; + +exit main; + diff --git a/plug-ins/perl/examples/example-fu b/plug-ins/perl/examples/example-fu new file mode 100755 index 0000000000..d347c12bba --- /dev/null +++ b/plug-ins/perl/examples/example-fu @@ -0,0 +1,70 @@ +#!/usr/bin/perl + +use Gimp; +use Gimp::Fu; + +register "gimp_fu_example_script", # fill in a function name + "A non-working example of Gimp::Fu usage", # and a short description, + "Just a starting point to derive new ". # a (possibly multiline) help text + "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 + N_"/Xtns/Gimp::Fu Example", # the menu path + "RGB*, GRAYA", # image types to accept (RGB, RGAB amnd GRAYA) + [ + # argument type, switch name , a short description , default value, extra arguments + [PF_SLIDER , "width" , "The image width" , 360, [300, 500]], + [PF_SPINNER , "height" , "The image height" , 100, [100, 200]], + [PF_STRING , "text" , "The Message" , "example text"], + [PF_INT , "bordersize" , "The bordersize" , 10], + [PF_FLOAT , "borderwidth" , "The borderwidth" , 1/5], + [PF_FONT , "font" , "The Font Family" ], + [PF_COLOUR , "text_colour" , "The (foreground) text colour", [10,10,10]], + [PF_COLOUR , "bg_colour" , "The background colour" , "#ff8000"], + [PF_TOGGLE , "ignore_cols" , "Ignore colours" , 0], + [PF_IMAGE , "extra_image" , "An additonal picture to ignore"], + [PF_DRAWABLE , "extra_draw" , "Somehting to ignroe as well" ], + [PF_RADIO , "type" , "The effect type" , 0, [small => 0, large => 1]], + [PF_BRUSH , "a_brush" , "An unused brush" ], + [PF_PATTERN , "a_pattern" , "An unused pattern" ], + [PF_GRADIENT , "a_gradients" , "An unused gradients" ], + ], + sub { + + # now do sth. useful with the garbage we got ;) + my($width,$height,$text,$font,$fg,$bg,$ignore,$brush,$pattern,$gradient)=@_; + + # set tracing + Gimp::set_trace(TRACE_ALL); + + 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 }; + + my $l=new Layer($img,$width,$height,RGB,"Background",100,NORMAL_MODE); + $l->add_layer(0); + + # now a few syntax examples + + Palette->set_foreground($fg) unless $ignore; + 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); + + gimp_palette_set_foreground("green"); + + # close the undo push group + eval { $img->undo_push_group_end }; + + $img; # return the image, or an empty list, i.e. () +}; + +exit main; + diff --git a/plug-ins/perl/examples/example-net b/plug-ins/perl/examples/example-net new file mode 100755 index 0000000000..eae4c85fc2 --- /dev/null +++ b/plug-ins/perl/examples/example-net @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +# example for the gimp-perl-server (also called Net-Server) + +use Gimp; + +Gimp::on_lib { + print STDERR "$0: this script is not intended to be run from within the gimp!\n"; +}; + +Gimp::on_net { + # simple benchmark ;) + + $img=new Gimp::Image(600,300,RGB); + # the is the same as $img = new Image(600,300,RGB) + + $bg=$img->layer_new(30,20,RGB_IMAGE,"Background",100,NORMAL_MODE); + + $bg->add_layer(1); + + new Gimp::Display($img); + + for $i (0..255) { + Palette->set_background([$i,255-$i,$i]); + $bg->edit_fill; + Display->displays_flush (); + } +# Gimp::Net::server_quit; # kill the gimp-perl-server-extension (ugly name) +}; + +exit main; + diff --git a/plug-ins/perl/examples/example-oo b/plug-ins/perl/examples/example-oo new file mode 100644 index 0000000000..f687c88d1f --- /dev/null +++ b/plug-ins/perl/examples/example-oo @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +# this extension shows some oo-like calls + +# it's really easy + +use Gimp; + +# the extension that's called. +sub plug_in_example_oo { + my $img=new Image(300,200,RGB); + + my $bg=new Layer($img,300,200,RGB_IMAGE,"Background",100,NORMAL_MODE); + + Palette->set_background([200,200,100]); + + $bg->fill(BG_IMAGE_FILL); +# Palette->set_background([200,100,200]); +# gimp_drawable_fill ($bg,BG_IMAGE_FILL); + $img->add_layer($bg,1); + + new Display($img); +} + +Gimp::on_run { + plug_in_example_oo; +}; + +Gimp::on_query { + gimp_install_procedure("plug_in_example_oo", "a test plug-in in perl", + "try it out", "Marc Lehmann", "Marc Lehmann", "1998-04-27", + N_"/Xtns/Perl Example Plug-in", "*", PROC_EXTENSION, + [[PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); +}; + +exit main; + diff --git a/plug-ins/perl/examples/feedback b/plug-ins/perl/examples/feedback new file mode 100755 index 0000000000..dea0f34892 --- /dev/null +++ b/plug-ins/perl/examples/feedback @@ -0,0 +1,41 @@ +#!/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 +# + + +use Gimp; +use Gimp::Fu; + +register "feedback", + "Take an image and feed it back onto itself multiple times", + "This plug-in simulates video feedback. It makes for kinda a neat desktop if you're into that sort of thing", + "Seth Burgess", + "Seth Burgess ", + "2-15-99", + N_"/Filters/Noise/Feedback", + "RGB, GRAY", + [ + [PF_SLIDER, "offset", "the amount the frames will offset", 3, [0, 255, 1]], + [PF_SLIDER, "repeat", "the number of times to repeat the illusion", 3, [0, 100, 1]], + ], + sub { + my($img,$drawable,$offset,$repeat)=@_; + + eval { $img->undo_push_group_start }; + + 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; + diff --git a/plug-ins/perl/examples/homepage-logo b/plug-ins/perl/examples/homepage-logo new file mode 100644 index 0000000000..cec197ab5d --- /dev/null +++ b/plug-ins/perl/examples/homepage-logo @@ -0,0 +1,151 @@ +#!/usr/bin/perl + +# THIS IS OUTDATED AND WILL NOT RUN WITH CURRENT GIMP VERSIONS! + +# this test-plugin will create a simple button, and does automatically +# save it as an indexed gif in /tmp/x.gif + +# it works as plug-in as well as standalone! +# this script is old (its the first script ever written for gimp-perl) +# and I had no time to fix it yet. + +use Gimp; + +$blend1 = [0, 150, 255]; +$blend2 = [0, 255, 208]; +$black = "#000000"; +$font = "Engraver"; + +# enable example mode... if disabled, it will write out some logos, and not +# wont' display anything. +$example = 1; + +# set trace level to watch functions as they are executed +Gimp::set_trace(TRACE_NAME) if $example; + +sub set_fg ($) { gimp_palette_set_foreground ($_[0]) }; +sub set_bg ($) { gimp_palette_set_background ($_[0]) }; +sub get_fg ($) { gimp_palette_get_foreground () }; +sub get_bg ($) { gimp_palette_get_background () }; + +# shorthand function for drawing text +sub text($$$$$) { + my($img,$text,$border,$font,$size)=@_; + my $layer=gimp_text($img,-1,0,0,$text,$border,1,$size,PIXELS,"*",$font,"*","*","*","*"); + if (wantarray()) { + ($layer,gimp_text_get_extents($text,$size,PIXELS,"*",$font,"*","*","*","*")); + } else { + $layer; + } +} + +# convert image to indexed +# and automatically save it as interlaced gif. +sub index_and_save($$) { + my($img,$path)=@_; + gimp_image_flatten($img); + gimp_convert_indexed_palette($img,1,0,32,""); + file_gif_save(RUN_NONINTERACTIVE,$img,-1,$path,$path,1,0,0,0) unless $example; +} + +sub write_logo { + my($string,$active,$w,$h,$uc)=@_; + + # create a new image + my $img=gimp_image_new($w,$h,RGB); + + # and a layer for it + my $bg=gimp_layer_new($img,$w,$h,RGB_IMAGE,"Background",100,NORMAL_MODE); + + gimp_image_add_layer($img,$bg,1); + + set_fg($blend1); + set_bg($blend2); + + # blend the background + gimp_blend($bg,FG_BG_HSV,NORMAL_MODE,LINEAR,100,0, + REPEAT_NONE,0,0,0, + 0,0,$w*0.9,$h); + gimp_rect_select ($img,$w*0.92,0,$w,$h,REPLACE, 0, 0); + gimp_blend($bg,FG_BG_HSV,NORMAL_MODE,LINEAR,100,0, + REPEAT_NONE,0,0,0, + $w,0,$w*0.92,0); + gimp_selection_all($img); + + set_fg($black); + + my ($text,$tw,$th,$ta,$td) = text ($img, $string, 1, $font, $active ? $h*0.7 : $h*0.5); + + gimp_layer_translate ($text,($w-$tw)/2,($h-$th+$td)/2); + + my ($shadow) = gimp_layer_copy ($text, 0); + + plug_in_gauss_rle ($text, 1, 1, 1) unless $active; + + gimp_image_add_layer ($img,$shadow,1); + + gimp_shear ($shadow,1,ORIENTATION_HORIZONTAL,-$th); + gimp_layer_scale ($shadow, $tw, $th*0.3, 1); + gimp_layer_translate ($shadow, $th*0.1, $th*0.3); + plug_in_gauss_rle ($shadow, 1, 1, 1); + + gimp_hue_saturation($bg, ALL_HUES, 0, 0, $active ? 10 : -40); + + plug_in_nova ($bg, $h*0.4, $h*0.5, '#f0a020', 5, 50) if $active; + plug_in_nova ($bg, $w-$h*0.4, $h*0.5, '#f0a020', 5, 50) if $active; + + # add an under construction sign + if ($uc) { + set_fg($active ? "#a00000" : "#000000"); + my ($uc,$tw,$th,$ta,$td) = text ($img, "u/c", 1, $font, $h*0.4); + gimp_rotate ($uc,1,0.2); + gimp_layer_translate ($uc,$w*0.84,($h-$th+$td)/2); + } + + index_and_save ($img, "/root/www/src/marc/images/${string}_".($active ? "on" : "off").".gif"); + + gimp_display_new ($img) if $example; + gimp_image_delete($img) unless $example; +} + +# the extension that's called. +sub extension_homepage_logo { + # if in example mode just draw one example logo. + if($example) { + push(@logos,[ "-Projects", 0, 480, 60 ]); +# push(@logos,[ "-Projects", 1, 480, 60 ]); + } else { + for $active (0, 1) { + for $string (qw(Projects -Background -Main)) { + push(@logos,[$string,$active,240,30]); + } + } + for $active (0, 1) { + for $string (qw(PGCC Judge -FreeISDN -Gimp -Destripe -Links -EGCS)) { + push(@logos,[$string,$active,240,20]); + } + } + } + gimp_progress_init ("rendering buttons..."); + $numlogos = $#logos+1; + while($#logos>=0) { + gimp_progress_update (1-($#logos+1)/$numlogos); + my($string,$active,$w,$h)=@{pop(@logos)}; + $uc=$string=~s/^-//; + write_logo($string,$active,$w,$h,$uc); + } +} + +sub query { + gimp_install_procedure("extension_homepage_logo", "a test extension in perl", + "try it out", "Marc Lehmann", "Marc Lehmann", "1997-02-06", + N_"/Xtns/Homepage-Logo", "*", PROC_EXTENSION, + [[PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); +} + +sub net { + extension_homepage_logo; +} + +exit main; + diff --git a/plug-ins/perl/examples/logulator b/plug-ins/perl/examples/logulator index dd1c46d7ba..2ef1387a58 100755 --- a/plug-ins/perl/examples/logulator +++ b/plug-ins/perl/examples/logulator @@ -3,7 +3,6 @@ use Gimp qw(:auto __ N_); use Gimp::Fu; use Gimp::Util; -use strict; #Gimp::set_trace(TRACE_CALL); @@ -29,7 +28,7 @@ sub register($$$$$$$$$;@) { splice @$params,$i,1; } } - defined($ti) and defined($fsi) and defined($fi) or die "$function, $menupath: no identifiable font\n"; + defined($ti) and defined($fsi) and defined($fi) or die "$function, $menupath: no identifiable font ($ti $fsi $fi)\n"; $menupath =~ /([^\/]+)$/; $help=< $_[1] ? $_[0] : $_[1]; } +############################################################################# # converted scripts start here +############################################################################# sub script_fu_3d_outline_logo { - my ($text_pattern, $text, $size, $font, $outline_blur_radius, $shadow_blur_radius, $bump_map_blur_radius, $noninteractive, $s_offset_x, $s_offset_y) = @_; + my ($text_pattern, $text, $size, $font, $outline_blur_radius, $shadow_blur_radius, $bump_map_blur_radius, $s_offset_x, $s_offset_y) = @_; do { my $img = gimp_image_new (256, 256, RGB_IMAGE); my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, 30, 1, $size, PIXELS, $font); @@ -149,20 +150,20 @@ sub script_fu_3d_outline_logo { gimp_layer_set_preserve_trans ($text_layer, 0); plug_in_gauss_iir ($img, $text_layer, $outline_blur_radius, 1, 1); gimp_layer_set_visible ($pattern, 0); - my $layer2 = gimp_image_merge_visible_layers ($img, 1); + $layer2 = gimp_image_merge_visible_layers ($img, 1); plug_in_edge ($img, $layer2, 2, 1); - my $layer3 = gimp_layer_copy ($layer2, 1); + $layer3 = gimp_layer_copy ($layer2, 1); gimp_image_add_layer ($img, $layer3, 2); plug_in_gauss_iir ($img, $layer2, $bump_map_blur_radius, 1, 1); gimp_selection_all ($img); gimp_patterns_set_pattern ($text_pattern); gimp_bucket_fill ($pattern, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); plug_in_bump_map ($img, $pattern, $layer2, 110.0, 45.0, 4, 0, 0, 0, 0, 1, 0, 0); - my $pattern_mask = gimp_layer_create_mask ($pattern, ADD_ALPHA_MASK); + $pattern_mask = gimp_layer_create_mask ($pattern, ALPHA_MASK); gimp_image_add_layer_mask ($img, $pattern, $pattern_mask); gimp_selection_all ($img); gimp_edit_copy ($layer3); - my $floating_sel = gimp_edit_paste ($pattern_mask, 0); + $floating_sel = gimp_edit_paste ($pattern_mask, 0); gimp_floating_sel_anchor ($floating_sel); gimp_image_remove_layer_mask ($img, $pattern, APPLY); gimp_invert ($layer3); @@ -170,7 +171,7 @@ sub script_fu_3d_outline_logo { gimp_channel_ops_offset ($layer3, 0, 1, $s_offset_x, $s_offset_y); gimp_layer_set_visible ($layer2, 0); gimp_layer_set_visible ($pattern, 1); - my $final = gimp_image_flatten ($img); + $final = gimp_image_flatten ($img); gimp_palette_set_background ($old_bg); gimp_palette_set_foreground ($old_fg); gimp_image_undo_enable ($img); @@ -184,7 +185,7 @@ register "perl_fu_3d_outline_logo", "Hrvoje Horvat (hhorvat\@open.hr)", "Hrvoje Horvat", "07 April, 1998", - N_"/Filters/Logulator/3D Outline", + __"/Filters/Logulator/3D Outline", "", [ [PF_PATTERN, 'pattern', "Pattern", "Parque #1"], @@ -194,12 +195,10 @@ register "perl_fu_3d_outline_logo", [PF_VALUE, 'outline_blur_radius',"Outline blur radius", "5"], [PF_VALUE, 'shadow_blur_radius',"Shadow blur radius", "10"], [PF_VALUE, 'bumpmap_alpha_layer_blur_radius',"Bump-map (alpha layer) blur radius", "5"], - [PF_TOGGLE, 'default_bumpmap_settings',"Default bump-map settings", 1], [PF_VALUE, 'shadow_x_offset', "Shadow X offset", "0"], [PF_VALUE, 'shadow_y_offset', "Shadow Y offset", "0"], ], \&script_fu_3d_outline_logo; - sub script_fu_alien_glow_logo { my ($text, $size, $font, $glow_color) = @_; do { @@ -246,7 +245,7 @@ register "perl_fu_alien_glow_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/Alien Glow", + __"/Filters/Logulator/Alien Glow", "", [ [PF_STRING, 'text_string', "Text String", "ALIEN"], @@ -255,7 +254,6 @@ register "perl_fu_alien_glow_logo", [PF_COLOUR, 'glow_color', "Glow Color", [63, 252, 0]], ], \&script_fu_alien_glow_logo; - sub script_fu_basic1_logo { my ($text, $size, $font, $bg_color, $text_color) = @_; do { @@ -300,7 +298,7 @@ register "perl_fu_basic1_logo", "Spencer Kimball", "Spencer Kimball", "1996", - N_"/Filters/Logulator/Basic I", + __"/Filters/Logulator/Basic I", "", [ [PF_STRING, 'text_string', "Text String", "The Gimp"], @@ -310,7 +308,6 @@ register "perl_fu_basic1_logo", [PF_COLOUR, 'text_color', "Text Color", [6, 6, 206]], ], \&script_fu_basic1_logo; - sub color_highlight { my ($color) = @_; do { @@ -337,7 +334,7 @@ sub script_fu_basic2_logo { my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 100, MULTIPLY_MODE); my $old_fg = gimp_palette_get_foreground (); my $old_bg = gimp_palette_get_background (); - + gimp_image_undo_disable ($img); gimp_image_resize ($img, $width, $height, 0, 0); gimp_image_add_layer ($img, $bg_layer, 1); @@ -376,7 +373,7 @@ register "perl_fu_basic2_logo", "Spencer Kimball", "Spencer Kimball", "1996", - N_"/Filters/Logulator/Basic II", + __"/Filters/Logulator/Basic II", "", [ [PF_STRING, 'text_string', "Text String", "SCRIPT-FU"], @@ -386,16 +383,166 @@ register "perl_fu_basic2_logo", [PF_COLOUR, 'text_color', "Text Color", [206, 6, 50]], ], \&script_fu_basic2_logo; - -sub multi_raise_layer { - my ($image, $layer, $times) = @_; - - while ($times > 0) { - gimp_image_raise_layer ($image, $layer); - $times = ($times - 1); - } +sub scale { + my ($size, $percent) = @_; + $size * $percent; } +sub script_fu_blended_logo { + my ($text, $size, $font, $bg_color, $text_color, $blend_fg, $blend_bg) = @_; + my $blend_mode = FG_BG_HSV; + do { + my $img = gimp_image_new (256, 256, RGB_IMAGE); + my $b_size = scale ($size, 0.1); + my $b_size_2 = scale ($size, 0.05); + my $f_size = scale ($size, 0.075); + my $ds_size = scale ($size, 0.05); + my $ts_size = ($b_size_2 - 3); + my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $b_size, 1, $size, PIXELS, $font); + my $width = gimp_drawable_width ($text_layer); + my $height = gimp_drawable_height ($text_layer); + my $blend_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Blend", 100, NORMAL_MODE); + my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 100, NORMAL_MODE); + my $text_shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Text Shadow", 100, MULTIPLY_MODE); + my $tsl_layer_mask = gimp_layer_create_mask ($text_shadow_layer, BLACK_MASK); + my $drop_shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Drop Shadow", 100, MULTIPLY_MODE); + my $dsl_layer_mask = gimp_layer_create_mask ($drop_shadow_layer, BLACK_MASK); + my $old_fg = gimp_palette_get_foreground (); + my $old_bg = gimp_palette_get_background (); + + gimp_image_undo_disable ($img); + gimp_image_resize ($img, $width, $height, 0, 0); + gimp_image_add_layer ($img, $shadow_layer, 1); + gimp_image_add_layer ($img, $blend_layer, 1); + gimp_image_add_layer ($img, $drop_shadow_layer, 1); + gimp_image_add_layer ($img, $text_shadow_layer, 0); + gimp_selection_none ($img); + gimp_edit_clear ($text_shadow_layer); + 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_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_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_selection_feather ($img, $f_size); + gimp_palette_set_background ([63, 63, 63]); + gimp_edit_fill ($drop_shadow_layer); + gimp_palette_set_background ([0, 0, 0]); + gimp_edit_fill ($text_shadow_layer); + 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); + gimp_palette_set_foreground ($blend_fg); + gimp_palette_set_background ($blend_bg); + gimp_blend ($blend_layer, $blend_mode, NORMAL_MODE, LINEAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, $width, 0); + gimp_layer_translate ($text_layer, -($b_size_2), -($b_size_2)); + gimp_layer_translate ($blend_layer, -($b_size), -($b_size)); + gimp_layer_translate ($text_shadow_layer, -($ts_size), -($ts_size)); + gimp_layer_translate ($drop_shadow_layer, $ds_size, $ds_size); + 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_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY); + gimp_selection_none ($img); + gimp_layer_set_name ($text_layer, $text); + gimp_palette_set_foreground ($old_fg); + gimp_palette_set_background ($old_bg); + gimp_image_undo_enable ($img); + gimp_display_new ($img); + }; +} + +register "perl_fu_blended_logo", + "Creates logos with blended backgrounds, highlights, and shadows", + "Creates logos with blended backgrounds, highlights, and shadows", + "Spencer Kimball", + "Spencer Kimball", + "1996", + __"/Filters/Logulator/Blended", + "", + [ + [PF_STRING, 'text_string', "Text String", "The GIMP"], + [PF_ADJUSTMENT,'font_size_pixels', "Font Size (pixels)", [150, 2, 1000, 1, 10, 0, 1]], + [PF_FONT, 'font', "Font", "-*-Crillee-*-r-*-*-24-*-*-*-p-*-*-*"], + [PF_COLOUR, 'background_color', "Background Color", [255, 255, 255]], + [PF_COLOUR, 'text_color', "Text Color", [124, 174, 255]], + [PF_COLOUR, 'starting_blend', "Starting Blend", [22, 9, 129]], + [PF_COLOUR, 'ending_blend', "Ending Blend", [129, 9, 82]], + ], + \&script_fu_blended_logo; +sub script_fu_bovinated_logo { + my ($text, $size, $font) = @_; + do { + my $img = gimp_image_new (256, 256, RGB_IMAGE); + my $border = $size / 4; + my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $border, 1, $size, PIXELS, $font); + my $width = gimp_drawable_width ($text_layer); + my $height = gimp_drawable_height ($text_layer); + my $bg_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Background", 100, NORMAL_MODE); + my $blur_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Blur", 100, NORMAL_MODE); + my $old_fg = gimp_palette_get_foreground (); + my $old_bg = gimp_palette_get_background (); + + gimp_image_undo_disable ($img); + gimp_image_resize ($img, $width, $height, 0, 0); + 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_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_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); + plug_in_gauss_rle ($img, $blur_layer, 5.0, 1, 1); + gimp_selection_none ($img); + gimp_layer_set_preserve_trans ($text_layer, 1); + gimp_selection_all ($img); + plug_in_solid_noise ($img, $text_layer, 0, 0, 23, 1, 16.0, 4.0); + gimp_brightness_contrast ($text_layer, 0, 127); + gimp_selection_none ($img); + gimp_layer_set_preserve_trans ($text_layer, 0); + gimp_layer_set_name ($text_layer, $text); + plug_in_bump_map ($img, $text_layer, $blur_layer, 135, 50, 10, 0, 0, 0, 30, 1, 0, 0); + gimp_layer_set_offsets ($blur_layer, 5, 5); + gimp_invert ($blur_layer); + gimp_layer_set_opacity ($blur_layer, 50.0); + gimp_image_set_active_layer ($img, $text_layer); + gimp_palette_set_background ($old_bg); + gimp_palette_set_foreground ($old_fg); + gimp_image_undo_enable ($img); + gimp_display_new ($img); + }; +} + +register "perl_fu_bovinated_logo", + "Makes Cow-spotted logos", + "Makes Cow-spotted logos", + "Brian McFee ", + "Brian McFee", + "April 1998", + __"/Filters/Logulator/Bovination", + "", + [ + [PF_STRING, 'text_string', "Text String", "Fear the Cow"], + [PF_ADJUSTMENT,'font_size_pixels', "Font Size (pixels)", [80, 2, 1000, 1, 10, 0, 1]], + [PF_FONT, 'font', "Font", "-*-roostheavy-*-r-*-*-24-*-*-*-p-*-*-*"], + ], + \&script_fu_bovinated_logo; sub carve_brush { my ($brush_size) = @_; $brush_size <= 5 ? "Circle (05)" @@ -509,14 +656,14 @@ sub script_fu_carved_logo { gimp_layer_set_opacity ($cast_shadow_layer, 75); plug_in_gauss_rle ($img, $cast_shadow_layer, $feather, 1, 1); gimp_layer_translate ($cast_shadow_layer, $offx, $offy); - $csl_mask = gimp_layer_create_mask ($cast_shadow_layer, ADD_BLACK_MASK); + $csl_mask = gimp_layer_create_mask ($cast_shadow_layer, BLACK_MASK); 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); $inset_layer = gimp_layer_copy ($layer1, 1); gimp_image_add_layer ($img, $inset_layer, 1); - $il_mask = gimp_layer_create_mask ($inset_layer, ADD_BLACK_MASK); + $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]); @@ -546,7 +693,7 @@ register "perl_fu_carved_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/Carved", + __"/Filters/Logulator/Carved", "", [ [PF_STRING, 'text_string', "Text String", "Marble"], @@ -556,7 +703,6 @@ register "perl_fu_carved_logo", [PF_TOGGLE, 'carve_raised_text',"Carve Raised Text", 0], ], \&script_fu_carved_logo; - sub script_fu_chalk_logo { my ($text, $size, $font, $bg_color, $chalk_color) = @_; do { @@ -576,7 +722,7 @@ sub script_fu_chalk_logo { gimp_edit_fill ($bg_layer); gimp_edit_clear ($text_layer); gimp_palette_set_foreground ($chalk_color); - my $float_layer = gimp_text_fontname ($img, $text_layer, 0, 0, $text, $border, 1, $size, PIXELS, $font); + $float_layer = gimp_text_fontname ($img, $text_layer, 0, 0, $text, $border, 1, $size, PIXELS, $font); gimp_floating_sel_anchor ($float_layer); plug_in_gauss_rle ($img, $text_layer, 2.0, 1, 1); plug_in_spread ($img, $text_layer, 5.0, 5.0); @@ -602,7 +748,7 @@ register "perl_fu_chalk_logo", "Manish Singh ", "Manish Singh", "October 1997", - N_"/Filters/Logulator/Chalk", + __"/Filters/Logulator/Chalk", "", [ [PF_STRING, 'text_string', "Text String", "CHALK"], @@ -612,7 +758,6 @@ register "perl_fu_chalk_logo", [PF_COLOUR, 'chalk_color', "Chalk Color", [255, 255, 255]], ], \&script_fu_chalk_logo; - sub script_fu_logo_chip_away { my ($text, $font, $font_size, $spread_amount, $blur_amount, $invert, $drop_shadow, $keep_bump, $bg_fill, $keep_back, $pattern) = @_; do { @@ -689,7 +834,7 @@ register "perl_fu_logo_chip_away", "Adrian Likins ", "Adrian Likins ", "1997", - N_"/Filters/Logulator/Chip Away", + __"/Filters/Logulator/Chip Away", "", [ [PF_STRING, 'text_string', "Text String", "Sloth"], @@ -705,7 +850,6 @@ register "perl_fu_logo_chip_away", [PF_PATTERN, 'pattern', "Pattern", "Burlwood"], ], \&script_fu_logo_chip_away; - sub script_fu_chrome_logo { my ($text, $size, $font, $bg_color) = @_; do { @@ -724,7 +868,7 @@ sub script_fu_chrome_logo { my $layer3 = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Layer 3", 100, NORMAL_MODE); my $shadow = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Drop Shadow", 100, NORMAL_MODE); my $background = gimp_layer_new ($img, $width, $height, RGB_IMAGE, "Background", 100, NORMAL_MODE); - my $layer_mask = gimp_layer_create_mask ($layer1, ADD_BLACK_MASK); + my $layer_mask = gimp_layer_create_mask ($layer1, BLACK_MASK); my $old_fg = gimp_palette_get_foreground (); my $old_bg = gimp_palette_get_background (); @@ -783,7 +927,7 @@ register "perl_fu_chrome_logo", "Spencer Kimball", "Spencer Kimball & Peter Mattis", "1997", - N_"/Filters/Logulator/Chrome", + __"/Filters/Logulator/Chrome", "", [ [PF_STRING, 'text_string', "Text String", "The GIMP"], @@ -792,7 +936,6 @@ register "perl_fu_chrome_logo", [PF_COLOUR, 'background_color', "Background Color", [191, 191, 191]], ], \&script_fu_chrome_logo; - sub script_fu_comic_logo { my ($text, $size, $font, $gradient, $ol_width) = @_; do { @@ -858,7 +1001,7 @@ register "perl_fu_comic_logo", "Brian McFee ", "Brian McFee", "April 1998", - N_"/Filters/Logulator/Comic Book", + __"/Filters/Logulator/Comic Book", "", [ [PF_STRING, 'text_string', "Text String", "Moo"], @@ -868,7 +1011,6 @@ register "perl_fu_comic_logo", [PF_VALUE, 'outline_width', "Outline width", "5"], ], \&script_fu_comic_logo; - sub script_fu_cool_metal_logo { my ($text, $size, $font, $bg_color, $seascape) = @_; do { @@ -941,7 +1083,7 @@ sub script_fu_cool_metal_logo { gimp_scale ($reflect_layer, 0, 0, 0, $width, 0.85 * $height); gimp_flip ($reflect_layer, 1); gimp_layer_set_offsets ($reflect_layer, 5, (3 + $height)); - $layer_mask = gimp_layer_create_mask ($reflect_layer, ADD_WHITE_MASK); + $layer_mask = gimp_layer_create_mask ($reflect_layer, WHITE_MASK); gimp_image_add_layer_mask ($img, $reflect_layer, $layer_mask); gimp_palette_set_foreground ([255, 255, 255]); gimp_palette_set_background ([0, 0, 0]); @@ -962,7 +1104,7 @@ register "perl_fu_cool_metal_logo", "Spencer Kimball & Rob Malda", "Spencer Kimball & Rob Malda", "1997", - N_"/Filters/Logulator/Cool Metal", + __"/Filters/Logulator/Cool Metal", "", [ [PF_STRING, 'text_string', "Text String", "Cool Metal"], @@ -972,7 +1114,6 @@ register "perl_fu_cool_metal_logo", [PF_TOGGLE, 'seascape', "Seascape", 0], ], \&script_fu_cool_metal_logo; - sub set_pt { my ($a, $index, $x, $y) = @_; do { @@ -1128,7 +1269,7 @@ sub script_fu_crystal_logo { gimp_layer_set_opacity ($layer1, 50); $layer1 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE); gimp_curves_spline ($layer1, 0, 18, spline1 ()); - $layer_mask = gimp_layer_create_mask ($layer1, ADD_BLACK_MASK); + $layer_mask = gimp_layer_create_mask ($layer1, BLACK_MASK); gimp_image_add_layer_mask ($img, $layer1, $layer_mask); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); @@ -1149,7 +1290,7 @@ sub script_fu_crystal_logo { $layer2 = gimp_layer_copy ($bg_layer, 1); gimp_image_add_layer ($img, $layer2, 1); plug_in_displace ($img, $layer2, $displace, $displace, 1, 1, $disp_map, $disp_map, 0); - $layer_mask2 = gimp_layer_create_mask ($layer2, ADD_BLACK_MASK); + $layer_mask2 = gimp_layer_create_mask ($layer2, BLACK_MASK); gimp_image_add_layer_mask ($img, $layer2, $layer_mask2); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); @@ -1183,7 +1324,7 @@ register "perl_fu_crystal_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/Crystal", + __"/Filters/Logulator/Crystal", "", [ [PF_VALUE, 'chrome_factor', "Chrome Factor", "1.0"], @@ -1194,6 +1335,14 @@ register "perl_fu_crystal_logo", [PF_FILE, 'environment_map', "Environment Map", "".'/usr/local/share/gimp'."/scripts/beavis.jpg"], ], \&script_fu_crystal_logo; +sub min { + my ($a, $b) = @_; + if ($a < $b) { + $a; + } else { + $b; + } +} sub script_fu_frosty_logo { my ($text, $size, $font, $bg_color) = @_; @@ -1203,7 +1352,7 @@ sub script_fu_frosty_logo { my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $border * 2, 1, $size, PIXELS, $font); my $width = gimp_drawable_width ($text_layer); my $height = gimp_drawable_height ($text_layer); - my $text_layer_mask = gimp_layer_create_mask ($text_layer, ADD_BLACK_MASK); + my $text_layer_mask = gimp_layer_create_mask ($text_layer, BLACK_MASK); my $sparkle_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Sparkle", 100, NORMAL_MODE); my $matte_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Matte", 100, NORMAL_MODE); my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 90, MULTIPLY_MODE); @@ -1232,7 +1381,7 @@ sub script_fu_frosty_logo { 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); - plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, min ($width, $height) / 2, 6, 15); + plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, min ($width, $height) / 2, 6, 15, 1.0, 1.0, 0.0, 0.0, 0, 0, 0, 0); gimp_levels ($sparkle_layer, 1, 0, 255, 0.2, 0, 255); gimp_levels ($sparkle_layer, 2, 0, 255, 0.7, 0, 255); gimp_selection_layer_alpha ($sparkle_layer); @@ -1277,7 +1426,7 @@ register "perl_fu_frosty_logo", "Spencer Kimball & Ed Mackey", "Spencer Kimball & Ed Mackey", "1997", - N_"/Filters/Logulator/Frosty", + __"/Filters/Logulator/Frosty", "", [ [PF_STRING, 'text_string', "Text String", "The GIMP"], @@ -1286,9 +1435,8 @@ register "perl_fu_frosty_logo", [PF_COLOUR, 'background_color', "Background Color", [255, 255, 255]], ], \&script_fu_frosty_logo; - sub script_fu_glossy_logo { - my ($text, $size, $font, $blend_gradient_text, $blend_gradient_outline, $grow_size, $bg_color, $use_pattern_text, $pattern_text, $use_pattern_outline, $pattern_outline, $use_pattern_overlay, $pattern_overlay, $noninteractive, $shadow_toggle, $s_offset_x, $s_offset_y, $flatten_toggle) = @_; + my ($text, $size, $font, $blend_gradient_text, $blend_gradient_outline, $grow_size, $bg_color, $use_pattern_text, $pattern_text, $use_pattern_outline, $pattern_outline, $use_pattern_overlay, $pattern_overlay, $shadow_toggle, $s_offset_x, $s_offset_y, $flatten_toggle) = @_; do { my $img = gimp_image_new (256, 256, RGB_IMAGE); my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, 30, 1, $size, PIXELS, $font); @@ -1356,14 +1504,16 @@ sub script_fu_glossy_logo { if ($shadow_toggle) { do { gimp_selection_layer_alpha ($text_layer); - "script-fu-drop-shadow"->(RUN_NONINTERACTIVE, $img, $text_layer, $s_offset_x, $s_offset_y, 15, [0, 0, 0], 80, 1); + $dont_drop_me = script_fu_drop_shadow(RUN_NONINTERACTIVE, $img, $text_layer, $s_offset_x, $s_offset_y, 15, [0, 0, 0], 80, 1); $width = gimp_image_width ($img); $height = gimp_image_height ($img); gimp_selection_none ($img); }; } if ($flatten_toggle) { - gimp_image_flatten ($img); + do { + $final = gimp_image_flatten ($img); + }; } gimp_gradients_set_active ($old_gradient); gimp_palette_set_background ($old_bg); @@ -1379,7 +1529,7 @@ register "perl_fu_glossy_logo", "Hrvoje Horvat (hhorvat\@open.hr)", "Hrvoje Horvat", "14/04/1998", - N_"/Filters/Logulator/Glossy", + __"/Filters/Logulator/Glossy", "", [ [PF_STRING, 'text_string', "Text String", "Galaxy"], @@ -1402,7 +1552,6 @@ register "perl_fu_glossy_logo", [PF_TOGGLE, 'flatten_image', "Flatten image?", 0], ], \&script_fu_glossy_logo; - sub script_fu_glowing_logo { my ($text, $size, $font, $bg_color) = @_; do { @@ -1462,7 +1611,7 @@ register "perl_fu_glowing_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/Glowing Hot", + __"/Filters/Logulator/Glowing Hot", "", [ [PF_STRING, 'text_string', "Text String", "GLOWING"], @@ -1471,7 +1620,6 @@ register "perl_fu_glowing_logo", [PF_COLOUR, 'background_color', "Background Color", [7, 0, 20]], ], \&script_fu_glowing_logo; - sub script_fu_gradient_bevel_logo { my ($text, $size, $font, $bevel_height, $bevel_width) = @_; do { @@ -1531,7 +1679,7 @@ register "perl_fu_gradient_bevel_logo", "Brian McFee ", "Brian McFee", "April 1998", - N_"/Filters/Logulator/Gradient Bevel", + __"/Filters/Logulator/Gradient Bevel", "", [ [PF_STRING, 'text_string', "Text String", "Moo"], @@ -1541,7 +1689,6 @@ register "perl_fu_gradient_bevel_logo", [PF_VALUE, 'bevel_width', "Bevel Width", "2.5"], ], \&script_fu_gradient_bevel_logo; - sub script_fu_i26_gunya2 { my ($text, $text_color, $frame_color, $font, $font_size, $frame_size) = @_; do { @@ -1610,17 +1757,24 @@ register "perl_fu_i26_gunya2", "Shuji Narazaki", "Shuji Narazaki", "1997", - N_"/Filters/Logulator/Imigre-26", + __"/Filters/Logulator/Imigre-26", "", [ [PF_STRING, 'text_string', "Text", "The GIMP"], [PF_COLOUR, 'text_color', "Text Color", [255, 0, 0]], [PF_COLOUR, 'frame_color', "Frame Color", [0, 34, 255]], - [PF_FONT, 'font', "Font", "-*-Becker-*-r-*-*-24-*-*-*-p-*-*-*"], + [PF_FONT, 'font', "Font"], [PF_ADJUSTMENT,'font_size_pixels', "Font Size (pixels)", [100, 2, 1000, 1, 10, 0, 1]], [PF_VALUE, 'frame_size', "Frame Size", "2"], ], \&script_fu_i26_gunya2; +sub set_pt { + my ($a, $index, $x, $y) = @_; + do { + $a->[$index * 2] = $x; + $a->[($index * 2 + 1)] = $y; + }; +} sub neon_spline1 { @@ -1661,7 +1815,6 @@ sub neon_spline3 { sub find_hue_offset { my ($color) = @_; do { - my $max; my $R = @{$color}[0]; my $G = @{$color}[1]; my $B = @{$color}[2]; @@ -1802,7 +1955,7 @@ register "perl_fu_neon_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/Neon", + __"/Filters/Logulator/Neon", "", [ [PF_STRING, 'text_string', "Text String", "NEON"], @@ -1813,7 +1966,6 @@ register "perl_fu_neon_logo", [PF_TOGGLE, 'create_shadow', "Create Shadow?", 0], ], \&script_fu_neon_logo; - sub script_fu_newsprint_text { my ($string, $font, $font_size, $cell_size, $density) = @_; do { @@ -1833,7 +1985,7 @@ sub script_fu_newsprint_text { gimp_edit_clear ($bg_layer); gimp_edit_clear ($text_layer); gimp_floating_sel_anchor (gimp_text_fontname ($img, $text_layer, 10, 10, $string, 0, 1, $font_size, PIXELS, $font)); - $text_mask = gimp_layer_create_mask ($text_layer, ADD_ALPHA_MASK); + $text_mask = gimp_layer_create_mask ($text_layer, ALPHA_MASK); gimp_image_add_layer_mask ($img, $text_layer, $text_mask); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([$grey, $grey, $grey]); @@ -1852,7 +2004,7 @@ register "perl_fu_newsprint_text", "Austin Donnelly", "Austin Donnelly", "1998", - N_"/Filters/Logulator/Newsprint text", + __"/Filters/Logulator/Newsprint text", "", [ [PF_STRING, 'text_string', "Text String", "Newsprint"], @@ -1862,7 +2014,6 @@ register "perl_fu_newsprint_text", [PF_ADJUSTMENT,'density', "Density (%)", [60, 0, 100, 1, 10, 0, 0]], ], \&script_fu_newsprint_text; - sub set_pt { my ($a, $index, $x, $y) = @_; do { @@ -2024,7 +2175,7 @@ sub script_fu_sota_chrome_logo { gimp_layer_set_visible ($layer2, 1); $layer1 = gimp_image_merge_visible_layers ($img, CLIP_TO_IMAGE); gimp_curves_spline ($layer1, 0, 18, spline1 ()); - $layer_mask = gimp_layer_create_mask ($layer1, ADD_BLACK_MASK); + $layer_mask = gimp_layer_create_mask ($layer1, BLACK_MASK); gimp_image_add_layer_mask ($img, $layer1, $layer_mask); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([255, 255, 255]); @@ -2073,7 +2224,7 @@ register "perl_fu_sota_chrome_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/SOTA Chrome", + __"/Filters/Logulator/SOTA Chrome", "", [ [PF_ADJUSTMENT,'chrome_saturation',"Chrome Saturation", [-80, -100, 100, 1, 10, 0, 0]], @@ -2087,7 +2238,6 @@ register "perl_fu_sota_chrome_logo", [PF_COLOUR, 'chrome_balance', "Chrome Balance", [0, 0, 0]], ], \&script_fu_sota_chrome_logo; - sub script_fu_speed_text { my ($string, $font, $font_size, $density) = @_; do { @@ -2111,8 +2261,8 @@ sub script_fu_speed_text { gimp_edit_clear ($text_layer); gimp_floating_sel_anchor (gimp_text_fontname ($img, $text_layer, 10, 10, $string, 0, 1, $font_size, PIXELS, $font)); gimp_selection_layer_alpha ($text_layer); - my $saved_sel = gimp_selection_save ($img); - my $text_mask = gimp_layer_create_mask ($text_layer, ADD_ALPHA_MASK); + $saved_sel = gimp_selection_save ($img); + $text_mask = gimp_layer_create_mask ($text_layer, ALPHA_MASK); gimp_image_add_layer_mask ($img, $text_layer, $text_mask); gimp_layer_set_edit_mask ($text_layer, 0); gimp_selection_grow ($img, 10); @@ -2141,7 +2291,7 @@ register "perl_fu_speed_text", "Austin Donnelly", "Austin Donnelly", "1998", - N_"/Filters/Logulator/Speed text", + __"/Filters/Logulator/Speed text", "", [ [PF_STRING, 'text_string', "Text String", "Speed!"], @@ -2150,7 +2300,6 @@ register "perl_fu_speed_text", [PF_ADJUSTMENT,'density', "Density (%)", [80, 0, 100, 1, 10, 0, 0]], ], \&script_fu_speed_text; - sub script_fu_starburst_logo { my ($text, $size, $fontname, $burst_color, $bg_color) = @_; do { @@ -2167,7 +2316,7 @@ sub script_fu_starburst_logo { my $bg_layer = gimp_layer_new ($img, $width, $height, RGB_IMAGE, "Background", 100, NORMAL_MODE); my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 100, NORMAL_MODE); my $burst_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Burst", 100, NORMAL_MODE); - my $layer_mask = gimp_layer_create_mask ($burst_layer, ADD_BLACK_MASK); + my $layer_mask = gimp_layer_create_mask ($burst_layer, BLACK_MASK); my $old_pattern = gimp_patterns_get_pattern (); my $old_fg = gimp_palette_get_foreground (); my $old_bg = gimp_palette_get_background (); @@ -2191,7 +2340,7 @@ sub script_fu_starburst_logo { gimp_palette_set_background ([255, 255, 255]); gimp_edit_fill ($layer_mask); gimp_selection_none ($img); - plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100); + plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), $burst_color, $burstradius, 100, 0); gimp_selection_layer_alpha ($text_layer); gimp_palette_set_background ([0, 0, 0]); gimp_selection_feather ($img, $feather); @@ -2218,7 +2367,7 @@ register "perl_fu_starburst_logo", "Spencer Kimball & Xach Beane", "Spencer Kimball & Xach Beane", "1997", - N_"/Filters/Logulator/Starburst", + __"/Filters/Logulator/Starburst", "", [ [PF_STRING, 'text_string', "Text String", "GIMP"], @@ -2228,7 +2377,6 @@ register "perl_fu_starburst_logo", [PF_COLOUR, 'bg_color', "BG Color", [255, 255, 255]], ], \&script_fu_starburst_logo; - sub find_blend_coords { my ($w, $h) = @_; do { @@ -2255,14 +2403,15 @@ sub find_nova_x_coord { my $limit = 100; my $clearance = 0; + while (($clearance == 0 and $limit > 0)) { $x = (rand ($range) + $x1); - $val = [gimp_drawable_get_pixel ($drawable, $x, $y)]; - $val_left = [gimp_drawable_get_pixel ($drawable, ($x - $min_clearance), $y)]; - $val_right = [gimp_drawable_get_pixel ($drawable, ($x + $min_clearance), $y)]; - $val_top = [gimp_drawable_get_pixel ($drawable, $x, ($y - $min_clearance))]; - $val_bottom = [gimp_drawable_get_pixel ($drawable, $x, ($y + $min_clearance))]; - if ($val->[$alpha] == 0 and $val_left->[$alpha] == 0 and $val_right->[$alpha] == 0 and $val_top->[$alpha] == 0 and $val_bottom->[$alpha] == 0) { + $val = @{[gimp_drawable_get_pixel ($drawable, $x, $y)]}[1]; + $val_left = @{[gimp_drawable_get_pixel ($drawable, ($x - $min_clearance), $y)]}[1]; + $val_right = @{[gimp_drawable_get_pixel ($drawable, ($x + $min_clearance), $y)]}[1]; + $val_top = @{[gimp_drawable_get_pixel ($drawable, $x, ($y - $min_clearance))]}[1]; + $val_bottom = @{[gimp_drawable_get_pixel ($drawable, $x, ($y + $min_clearance))]}[1]; + if (($val->[$alpha] == 0 and $val_left->[$alpha] == 0 and $val_right->[$alpha] == 0 and $val_top->[$alpha] == 0 and $val_bottom->[$alpha] == 0)) { $clearance = 1; } else { $limit = ($limit - 1); @@ -2327,7 +2476,7 @@ sub script_fu_starscape_logo { gimp_palette_set_background ([31, 31, 31]); gimp_palette_set_foreground ([255, 255, 255]); gimp_blend ($text_layer, FG_BG_RGB, NORMAL_MODE, BILINEAR, 100, 0, REPEAT_NONE, 0, 0, 0, $cx, $cy, $bx, $by); - plug_in_nova ($img, $glow_layer, $novax, $novay, $glow_color, $novaradius, 100); + plug_in_nova ($img, $glow_layer, $novax, $novay, $glow_color, $novaradius, 100, 0); gimp_selection_all ($img); gimp_patterns_set_pattern ("Stone"); gimp_bucket_fill ($bump_channel, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 0, 0); @@ -2349,7 +2498,7 @@ register "perl_fu_starscape_logo", "Spencer Kimball", "Spencer Kimball", "1997", - N_"/Filters/Logulator/Starscape", + __"/Filters/Logulator/Starscape", "", [ [PF_STRING, 'text_string', "Text String", "Nova"], @@ -2358,7 +2507,6 @@ register "perl_fu_starscape_logo", [PF_COLOUR, 'glow_color', "Glow Color", [28, 65, 188]], ], \&script_fu_starscape_logo; - sub script_fu_t_o_p_logo { my ($text, $size, $fontname, $hit_rate, $edge_size, $edge_only, $base_color, $bg_color) = @_; do { @@ -2367,7 +2515,7 @@ sub script_fu_t_o_p_logo { my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $border * 2, 1, $size, PIXELS, $fontname); my $width = gimp_drawable_width ($text_layer); my $height = gimp_drawable_height ($text_layer); - my $text_layer_mask = gimp_layer_create_mask ($text_layer, ADD_BLACK_MASK); + my $text_layer_mask = gimp_layer_create_mask ($text_layer, BLACK_MASK); my $sparkle_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Sparkle", 100, NORMAL_MODE); my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 90, ADDITION_MODE); my $bg_layer = gimp_layer_new ($img, $width, $height, RGB_IMAGE, "Background", 100, NORMAL_MODE); @@ -2396,7 +2544,7 @@ sub script_fu_t_o_p_logo { gimp_selection_border ($img, $edge_size); plug_in_noisify ($img, $sparkle_layer, 0, $hit_rate, $hit_rate, $hit_rate, 0.0); gimp_selection_none ($img); - plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, $width, 6, 15); + plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, $width, 6, 15, 1.0, 1.0, 0.0, 0.0, 0, 0, 0, 0); gimp_selection_load ($selection); gimp_selection_shrink ($img, $edge_size); gimp_levels ($sparkle_layer, 0, 0, 255, 1.2, 0, 255); @@ -2446,11 +2594,11 @@ register "perl_fu_t_o_p_logo", "Shuji Narazaki (narazaki\@InetQ.or.jp)", "Shuji Narazaki", "1997", - N_"/Filters/Logulator/Particle Trace", + __"/Filters/Logulator/Particle Trace", "", [ [PF_STRING, 'text_string', "Text String", "The GIMP"], - [PF_ADJUSTMENT,'font_size_pixels', "Font size (in pixels)", [100, 1, 1000, 1, 10, 0, 1]], + [PF_ADJUSTMENT,'font_size_pixels',"Font size (in pixels)", [100, 1, 1000, 1, 10, 0, 1]], [PF_FONT, 'font', "Font", "-*-becker-*-r-*-*-24-*-*-*-p-*-*-*"], [PF_ADJUSTMENT,'hit_rate', "Hit Rate [0.0,1.0]", [0.2, 0, 1, .01, .01, 2, 0]], [PF_ADJUSTMENT,'edge_width', "Edge Width", [2, 0, 128, 1, 1, 0, 0]], @@ -2459,7 +2607,6 @@ register "perl_fu_t_o_p_logo", [PF_COLOUR, 'background_color', "Background Color", [255, 255, 255]], ], \&script_fu_t_o_p_logo; - sub scale { my ($size, $percent) = @_; $size * $percent; @@ -2480,9 +2627,9 @@ sub script_fu_textured_logo { my $blend_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Blend", 100, NORMAL_MODE); my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 100, NORMAL_MODE); my $text_shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Text Shadow", 100, MULTIPLY_MODE); - my $tsl_layer_mask = gimp_layer_create_mask ($text_shadow_layer, ADD_BLACK_MASK); + my $tsl_layer_mask = gimp_layer_create_mask ($text_shadow_layer, BLACK_MASK); my $drop_shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Drop Shadow", 100, MULTIPLY_MODE); - my $dsl_layer_mask = gimp_layer_create_mask ($drop_shadow_layer, ADD_BLACK_MASK); + my $dsl_layer_mask = gimp_layer_create_mask ($drop_shadow_layer, BLACK_MASK); my $old_fg = gimp_palette_get_foreground (); my $old_bg = gimp_palette_get_background (); @@ -2544,11 +2691,11 @@ register "perl_fu_textured_logo", "Spencer Kimball", "Spencer Kimball", "1996", - N_"/Filters/Logulator/Textured", + __"/Filters/Logulator/Textured", "", [ [PF_PATTERN, 'text_pattern', "Text Pattern", "Fibers"], - [PF_ADJUSTMENT,'mosaic_tile_type',"Mosaic Tile Type\n Squares 0, HEX 1, Oct 2", [0, 0, 2, 1, 1, 0, 1]], + [PF_ADJUSTMENT,'mosaic_tile_type',"Mosaic Tile Type; Squares 0, HEX 1, Oct 2", [0, 0, 2, 1, 1, 0, 1]], [PF_STRING, 'text_string', "Text String", "The GIMP"], [PF_ADJUSTMENT,'font_size_pixels', "Font Size (pixels)", [200, 1, 1000, 1, 10, 0, 1]], [PF_FONT, 'font', "Font", "-*-cuneifontlight-*-r-*-*-24-*-*-*-p-*-*-*"], @@ -2557,167 +2704,79 @@ register "perl_fu_textured_logo", [PF_COLOUR, 'ending_blend', "Ending Blend", [0, 0, 106]], ], \&script_fu_textured_logo; - -sub script_fu_bovinated_logo { - my ($text, $size, $font) = @_; +sub script_fu_title_header { + my ($text, $size, $fontname) = @_; do { + my $padding = 8; + my $fade_width = 64; + my $old_fg_color = gimp_palette_get_foreground (); + my $old_bg_color = gimp_palette_get_background (); my $img = gimp_image_new (256, 256, RGB_IMAGE); - my $border = $size / 4; - my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $border, 1, $size, PIXELS, $font); - my $width = gimp_drawable_width ($text_layer); - my $height = gimp_drawable_height ($text_layer); - my $bg_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Background", 100, NORMAL_MODE); - my $blur_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Blur", 100, NORMAL_MODE); - my $old_fg = gimp_palette_get_foreground (); - my $old_bg = gimp_palette_get_background (); + my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $padding, 1, $size, PIXELS, $fontname); + my $text_width = gimp_drawable_width ($text_layer); + my $text_height = gimp_drawable_height ($text_layer); + my $text_layers_offset = $text_height / 2; + my $img_width = ($text_layers_offset + $text_width + $fade_width); + my $img_height = $text_height; + my $bg_layer = gimp_layer_new ($img, $img_width, $img_height, RGBA_IMAGE, "bg-layer", 100, NORMAL_MODE); + my $bumpmap_layer = gimp_layer_new ($img, $text_width, $text_height, RGBA_IMAGE, "bumpmap-layer", 100, NORMAL_MODE); + my $fore_layer = gimp_layer_new ($img, $text_width, $text_height, RGBA_IMAGE, "fore-layer", 100, NORMAL_MODE); gimp_image_undo_disable ($img); - gimp_image_resize ($img, $width, $height, 0, 0); - gimp_image_add_layer ($img, $bg_layer, 1); - gimp_image_add_layer ($img, $blur_layer, 1); - gimp_selection_all ($img); + gimp_image_resize ($img, $img_width, $img_height, 0, 0); + gimp_image_add_layer ($img, $bg_layer, -1); + gimp_image_add_layer ($img, $bumpmap_layer, -1); + gimp_image_add_layer ($img, $fore_layer, -1); + gimp_image_raise_layer ($img, $text_layer); + gimp_image_raise_layer ($img, $text_layer); + gimp_image_raise_layer ($img, $text_layer); + gimp_layer_set_offsets ($bg_layer, 0, 0); + gimp_layer_set_offsets ($text_layer, $text_layers_offset, 0); + 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_selection_layer_alpha ($text_layer); + gimp_palette_set_background ([255, 255, 255]); + gimp_edit_fill ($bumpmap_layer); + 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); + 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_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)); + gimp_edit_fill ($bg_layer); + 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]); + gimp_blend ($bg_layer, FG_BG_RGB, NORMAL_MODE, LINEAR, 100, 0, REPEAT_NONE, 0, 0.2, 3, ($img_width - $fade_width), 0, ($img_width - 1), 0); 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_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); - plug_in_gauss_rle ($img, $blur_layer, 5.0, 1, 1); - gimp_selection_none ($img); - gimp_layer_set_preserve_trans ($text_layer, 1); - gimp_selection_all ($img); - plug_in_solid_noise ($img, $text_layer, 0, 0, 23, 1, 16.0, 4.0); - gimp_brightness_contrast ($text_layer, 0, 127); - gimp_selection_none ($img); - gimp_layer_set_preserve_trans ($text_layer, 0); - gimp_layer_set_name ($text_layer, $text); - plug_in_bump_map ($img, $text_layer, $blur_layer, 135, 50, 10, 0, 0, 0, 30, 1, 0, 0); - gimp_layer_set_offsets ($blur_layer, 5, 5); - gimp_invert ($blur_layer); - gimp_layer_set_opacity ($blur_layer, 50.0); - gimp_image_set_active_layer ($img, $text_layer); - gimp_palette_set_background ($old_bg); - gimp_palette_set_foreground ($old_fg); + gimp_palette_set_foreground ($old_fg_color); + gimp_palette_set_background ($old_bg_color); gimp_image_undo_enable ($img); gimp_display_new ($img); }; } -register "perl_fu_bovinated_logo", - "Makes Cow-spotted logos", - "Makes Cow-spotted logos", - "Brian McFee ", - "Brian McFee", - "April 1998", - N_"/Filters/Logulator/Bovination", +register "perl_fu_title_header", + "Web title header", + "Web title header", + "Federico Mena Quintero", + "Federico Mena Quintero", + "June 1997", + __"/Filters/Logulator/Web title header", "", [ - [PF_STRING, 'text_string', "Text String", "Fear the Cow"], - [PF_ADJUSTMENT,'font_size_pixels', "Font Size (pixels)", [80, 2, 1000, 1, 10, 0, 1]], - [PF_FONT, 'font', "Font", "-*-roostheavy-*-r-*-*-24-*-*-*-p-*-*-*"], + [PF_STRING, 'text_string', "Text", "Hello world!"], + [PF_ADJUSTMENT,'font_size_pixels', "Text size", [32, 2, 256, 1, 10, 0, 0]], + [PF_FONT, 'font', "Font", "-adobe-helvetica-bold-r-normal-*-30-*-*-*-p-*-*-*"], ], - \&script_fu_bovinated_logo; - -sub scale { - my ($size, $percent) = @_; - $size * $percent; -} - -sub script_fu_blended_logo { - my ($blend_mode, $text, $size, $font, $bg_color, $text_color, $blend_fg, $blend_bg) = @_; - do { - my $img = gimp_image_new (256, 256, RGB_IMAGE); - my $b_size = scale ($size, 0.1); - my $b_size_2 = scale ($size, 0.05); - my $f_size = scale ($size, 0.075); - my $ds_size = scale ($size, 0.05); - my $ts_size = ($b_size_2 - 3); - my $text_layer = gimp_text_fontname ($img, -1, 0, 0, $text, $b_size, 1, $size, PIXELS, $font); - my $width = gimp_drawable_width ($text_layer); - my $height = gimp_drawable_height ($text_layer); - my $blend_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Blend", 100, NORMAL_MODE); - my $shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Shadow", 100, NORMAL_MODE); - my $text_shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Text Shadow", 100, MULTIPLY_MODE); - my $tsl_layer_mask = gimp_layer_create_mask ($text_shadow_layer, ADD_BLACK_MASK); - my $drop_shadow_layer = gimp_layer_new ($img, $width, $height, RGBA_IMAGE, "Drop Shadow", 100, MULTIPLY_MODE); - my $dsl_layer_mask = gimp_layer_create_mask ($drop_shadow_layer, ADD_BLACK_MASK); - my $old_fg = gimp_palette_get_foreground (); - my $old_bg = gimp_palette_get_background (); - - gimp_image_undo_disable ($img); - gimp_image_resize ($img, $width, $height, 0, 0); - gimp_image_add_layer ($img, $shadow_layer, 1); - gimp_image_add_layer ($img, $blend_layer, 1); - gimp_image_add_layer ($img, $drop_shadow_layer, 1); - gimp_image_add_layer ($img, $text_shadow_layer, 0); - gimp_selection_none ($img); - gimp_edit_clear ($text_shadow_layer); - 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_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_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_selection_feather ($img, $f_size); - gimp_palette_set_background ([63, 63, 63]); - gimp_edit_fill ($drop_shadow_layer); - gimp_palette_set_background ([0, 0, 0]); - gimp_edit_fill ($text_shadow_layer); - 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); - gimp_palette_set_foreground ($blend_fg); - gimp_palette_set_background ($blend_bg); - gimp_blend ($blend_layer, eval $blend_mode, NORMAL_MODE, LINEAR, 100, 0, REPEAT_NONE, 0, 0, 0, 0, 0, $width, 0); - gimp_layer_translate ($text_layer, -($b_size_2), -($b_size_2)); - gimp_layer_translate ($blend_layer, -($b_size), -($b_size)); - gimp_layer_translate ($text_shadow_layer, -($ts_size), -($ts_size)); - gimp_layer_translate ($drop_shadow_layer, $ds_size, $ds_size); - 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_image_remove_layer_mask ($img, $drop_shadow_layer, APPLY); - gimp_selection_none ($img); - gimp_layer_set_name ($text_layer, $text); - gimp_palette_set_foreground ($old_fg); - gimp_palette_set_background ($old_bg); - gimp_image_undo_enable ($img); - gimp_display_new ($img); - }; -} - -register "perl_fu_blended_logo", - "Creates logos with blended backgrounds, highlights, and shadows", - "Creates logos with blended backgrounds, highlights, and shadows", - "Spencer Kimball", - "Spencer Kimball", - "1996", - N_"/Filters/Logulator/Blended", - "", - [ - [PF_VALUE, 'blend_mode', "Blend Mode", "FG_BG_HSV"], - [PF_STRING, 'text_string', "Text String", "The GIMP"], - [PF_ADJUSTMENT,'font_size_pixels', "Font Size (pixels)", [150, 2, 1000, 1, 10, 0, 1]], - [PF_FONT, 'font', "Font", "-*-Crillee-*-r-*-*-24-*-*-*-p-*-*-*"], - [PF_COLOUR, 'background_color', "Background Color", [255, 255, 255]], - [PF_COLOUR, 'text_color', "Text Color", [124, 174, 255]], - [PF_COLOUR, 'starting_blend', "Starting Blend", [22, 9, 129]], - [PF_COLOUR, 'ending_blend', "Ending Blend", [129, 9, 82]], - ], - \&script_fu_blended_logo; + \&script_fu_title_header; exit main; diff --git a/plug-ins/perl/examples/perlcc b/plug-ins/perl/examples/perlcc index 3e734f243c..40eb303e87 100755 --- a/plug-ins/perl/examples/perlcc +++ b/plug-ins/perl/examples/perlcc @@ -78,7 +78,7 @@ sub gtkview_log { $w->vbox->add($b); $b->realize; # for gtk-1.0 $b->insert($font,$b->style->fg(-normal),undef,$log); - $b->set_usize($font->string_width('M')*80,($font->ascent+$font->descent)*($lines+1)); + $b->set_usize($font->string_width('M')*80,($font->ascent+$font->descent)*($lines+2)); $b = new Gtk::Button "OK"; $b->can_default(1); diff --git a/plug-ins/perl/examples/prep4gif b/plug-ins/perl/examples/prep4gif new file mode 100755 index 0000000000..ccd23a8ef5 --- /dev/null +++ b/plug-ins/perl/examples/prep4gif @@ -0,0 +1,109 @@ +#!/usr/bin/perl + +use Gimp qw(:auto N_ __); +use Gimp::Fu; + +# This script requires a Gimp version >= 0.96 (I haven't checked - ymmv) +# small changes by Marc Lehmann + +# prep4gif.pl +# by Seth Burgess +# June 29, 1998 +# +# This perl plug-in prepares a multilayer RGB image for use as a +# transparent gif. To use this prpoerly, you want to have something +# close to the intended background as the bottom layer. If convert +# to indexed is not selected, the bottom two options are unused. +# +# TODO: Write a nicer GUI than Gimp::Fu provides (learn some gtk) +# Anything else that seems useful + +# Gimp::set_trace(TRACE_ALL); + +sub prep { + my ($img, $drawable, $threshold, $growth, $index, $dither, $colors) = @_; + +# 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"); + return; + } + +# 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); + +# NOTE TO PERL NEWBIES - 'my' variables should be declared in their outermost +# scope - if defined inside the if statement, will disappear to program. + + my $foreground; + + if ($#layers > 1) { + $foreground = gimp_image_merge_visible_layers($out, 0); + } + else { + $foreground = $layers[0]; + }; + + my $layer_mask = gimp_layer_create_mask($foreground,2); + gimp_image_add_layer_mask ($out, $foreground, $layer_mask); + gimp_threshold($layer_mask,$threshold,255); + +# Transfer layer mask to selection, and grow the selection + gimp_selection_layer_alpha($foreground); + gimp_selection_grow($out,$growth); + +# 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,1, MAKE_PALETTE, $colors, $dither, 1, ""); + } + +# 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", + N_"/Filters/Web/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/scratches b/plug-ins/perl/examples/scratches new file mode 100755 index 0000000000..80b43a3a15 --- /dev/null +++ b/plug-ins/perl/examples/scratches @@ -0,0 +1,59 @@ +#!/usr/bin/perl + +use Gimp; +use Gimp::Fu; +use Gimp::Util; + +sub new_scratchlayer { + my($image,$length,$gamma,$angle)=@_; + my $type=$image->layertype(0); + my($layer)=$image->layer_new ($image->width, $image->height, $image->layertype(0), + "displace layer ($angle)", 100, NORMAL_MODE); + $layer->add_layer(-1); + $layer->fill (WHITE_IMAGE_FILL); + $layer->noisify (0, 1, 1, 1, 0); + $layer->mblur (0, $length, $angle); + #$layer->levels (VALUE_LUT, 120, 255, $gamma, 0, 255); + $layer->levels (VALUE_LUT, 120, 255, 0.3, 0, 255); + + $layer; +} + +register "scratches", + "Create a scratch effect", + "Add scratches to an existing image. Works best on a metallic-like background.", + "Marc Lehmann", + "Marc Lehmann ", + "19990223", + N_"/Filters/Distorts/Scratches", + "*", + [ + [PF_SLIDER , "angle_x" , "The horizontal angle" , 30, [ 0, 360]], + [PF_SLIDER , "angle_y" , "The vertical angle" , 70, [ 0, 360]], + [PF_SLIDER , "gamma" , "Scratch map gamma" , 0.3, [0.1, 10, 0.05]], + [PF_SPINNER , "smoothness" , "The scratch smoothness" , 15, [ 0, 400]], + [PF_SPINNER , "length" , "The scratch length" , 10, [ 0, 400]], + #[PF_BOOL, , "bump_map" , "Use bump map instead of displace", 0], + ], + [], + ['gimp-1.1'], + sub { + my($image,$drawable,$anglex,$angley,$gamma,$length,$width)=@_; + + $image->undo_push_group_start; + + my $layer1 = new_scratchlayer ($image, $length, $gamma, $anglex); + my $layer2 = new_scratchlayer ($image, $length, $gamma, $angley); + + $drawable->displace ($width, $width, 1, 1, $layer1, $layer2, WRAP); + + $layer1->remove_layer; + $layer2->remove_layer; + + $image->undo_push_group_end; + + $image; +}; + +exit main; + diff --git a/plug-ins/perl/examples/view3d b/plug-ins/perl/examples/view3d new file mode 100755 index 0000000000..09015cbedb --- /dev/null +++ b/plug-ins/perl/examples/view3d @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +use Gimp::Feature qw(pdl); +use PDL; +BEGIN { eval "use PDL::Graphics::TriD"; $@ and Gimp::Feature::missing('PDL TriD (OpenGL) support') } +use Gimp; +use Gimp::Fu; + +register + 'view3d', + 'View grayscale drawable in 3D', + 'This script uses PDL::Graphics:TriD to view a grayscale drawable in 3D. You can choose a Cartesian (default) or Polar projection, toggle the drawing of lines, and toggle normal smoothing.', + 'Tom Rathborne', 'GPLv2', '1999-03-11', + N_"/View/3D Surface", + 'RGB*,GRAY*', [ + [ PF_BOOL, 'polar', 'Radial view', 0], + [ PF_BOOL, 'lines', 'Draw grid lines', 0], + [ PF_BOOL, 'smooth', 'Smooth surface normals', 1] + ], [], +sub { + my ($img, $dwb, $polar, $lines, $smooth) = @_; + + my $w = $dwb->width; + my $h = $dwb->height; + + my $regn = $dwb->pixel_rgn (0, 0, $w, $h, 0, 0); + my $surf = $regn->get_rect (0, 0, $w, $h); + $surf=$surf->slice("(0)"); + + imag3d [ $polar ? 'POLAR2D' : 'SURF2D', $surf ], + { 'Lines' => $lines, 'Smooth' => $smooth }; + + (); +}; + +exit main; + diff --git a/plug-ins/perl/examples/webify b/plug-ins/perl/examples/webify new file mode 100755 index 0000000000..981d97e756 --- /dev/null +++ b/plug-ins/perl/examples/webify @@ -0,0 +1,47 @@ +#!/usr/bin/perl + +use Gimp; +use Gimp::Fu; + +#Gimp::set_trace(TRACE_ALL); + +register "webify", + "Make an image suitable for the web", + "This plug-in converts the image to indexed, with some extra options", + "Marc Lehmann", + "Marc Lehmann", + "1.0", + N_"/Filters/Web/Webify", + "RGB*, GRAY*", + [ + [PF_BOOL, "new", "create a new image?", 1], + [PF_BOOL, "transparent", "make transparent?", 1], + [PF_COLOUR, "bg_color", "the background colour to use for transparency", "white"], + [PF_SLIDER, "threshold", "the threshold to use for background detection", 3, [0, 255, 1]], + [PF_INT32, "colors", "how many colours to use (0 = don't convert to indexed)", 32], + [PF_BOOL, "autocrop", "autocrop at end?", 1], + ], + sub { + my($img,$drawable,$new,$alpha,$bg,$thresh,$colours,$autocrop)=@_; + + $img = $img->channel_ops_duplicate if $new; + + eval { $img->undo_push_group_start }; + + $drawable = $img->flatten; + + if ($alpha) { + $drawable->add_alpha; + $drawable->by_color_select($bg,$thresh,REPLACE,1,0,0,0); + $drawable->edit_cut if $img->selection_bounds; + } + Plugin->autocrop($drawable) if $autocrop; + $img->convert_indexed (2, 0, $colours, 0, 0, '') if $colours; + + eval { $img->undo_push_group_end }; + + $new ? ($img->clean_all, $img) : (); +}; + +exit main; + diff --git a/plug-ins/perl/examples/windify b/plug-ins/perl/examples/windify new file mode 100755 index 0000000000..eb08916774 --- /dev/null +++ b/plug-ins/perl/examples/windify @@ -0,0 +1,65 @@ +#!/usr/bin/perl + +# sent to me by Seth Burgess +# small changes my Marc Lehmann + +use Gimp; +use Gimp::Fu; + +#Gimp::set_trace(TRACE_CALL); + +sub windify { + my ($img, $drawable, $angle, $density, $distance, $wrap) = @_; + my $oldbg = gimp_palette_get_background(); + my $xsize = gimp_drawable_width($drawable); + my $ysize = gimp_drawable_height($drawable); + + 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(1,$out,$windlayercopy,0,$density/255, + $density/255, + $density/255,1); + + plug_in_mblur(1,$out,$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(1,$img,$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(); + + undef; + } + +register + "windify", + "Add wind to an image", + "Blow your image all over :)", + "Seth Burgess", + "Seth Burgess ", + "1998-09-14", + N_"/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; + diff --git a/plug-ins/perl/examples/xachlego b/plug-ins/perl/examples/xachlego new file mode 100755 index 0000000000..2ceef1af99 --- /dev/null +++ b/plug-ins/perl/examples/xachlego @@ -0,0 +1,119 @@ +#!/usr/bin/perl +# 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 +# or Artistic liscence, whichever makes you happier. +# +# sjburges: 1. pixelize the photo 2. in a new white layer, render a grid +# at the same resolution as the pixelize, then blur it. threshold the +# grid until you get a roundish blob in the center of each square (you +# may need to repeat a few times). +# sjburges: meanwhile, back at the pixelized image, bumpmap it with +# itself and a depth of about 5. do this twice. then bumpmap it with +# the round blobby layer. +# then create a new, clean grid, and bumpmap the pixelized layer with it +# + +# (To get a decent blobby grid) +# render a grid at 10x10, gaussian blur at 7, then set levels to +# 196 1.00 234 + +# Revision - 1.1: added a gimp_displays_flush() for 1.0.x users +# stopped deleting the layers after removal - it was +# causing bad things to happen with refcounts. I hope +# gimp is cleaning up this memory on its own... +# 1.2: Fixed buggy selection handling - oops ;) +# 1.3: Added undo capability by Marc Lehman +# 1.4: Marc Lehman , changed function name +# 1.5: Seth Burgess added my email, put it +# in a directory more suitable than the lame "Misc" +# Here's the boring start of every script... + +use Gimp qw(:auto __ N_); +use Gimp::Fu; + +register "xach_blocks", + "Xach's Blocks o' Fun", + "Turn your picture into something that resembles a certain trademarked + building block creation", + "Seth Burgess", + "Seth Burgess ", + "2-15-98", + N_"/Filters/Map/Xach Blocks...", + "*", + [ + [PF_SLIDER, "block_size", "The size of the blocks", 10, [0, 255, 1]], + [PF_SLIDER, "knob_factor", "The size of your knob", 40, [0, 100, 5]], + ], + sub { + my($img,$drawable,$blocksize, $knobfactor)=@_; + $selection_flag = 0; + eval { $img->undo_push_group_start }; + if (!$drawable->has_alpha) { + $drawable->add_alpha; + }; + if ($img->selection_is_empty) { + $img->selection_all; + $selection_flag = 1; + } + $oldbackground = gimp_palette_get_background(); +# Now the fun begins :) + + $selection = $img->selection_save; + +#1. Pixelize the photo + $drawable->plug_in_pixelize($blocksize); +# 2. in a new white layer, render a grid +# at the same resolution as the pixelize, then blur it. + $gridlayer = $img->layer_new($img->width, $img->height, RGBA_IMAGE, "Grid 1", 100, 0); + $img->add_layer($gridlayer,0); + $img->selection_all; + gimp_edit_clear($gridlayer); + gimp_palette_set_background([255,255,255]); + gimp_edit_fill($gridlayer); + $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); + +# threshold the +# grid until you get a roundish blob in the center of each square (you +# may need to repeat a few times). + + $gridlayer->levels(0, 196, 234, $knobfactor/100.0 , 0, 255); + +# sjburges: meanwhile, back at the pixelized image, bumpmap it with +# itself and a depth of about 5. do this twice. + gimp_selection_load($selection); + $drawable->plug_in_bump_map($drawable, 135, 45, 5, 0, 0, 0, 0, 1, 0, 0); + $drawable->plug_in_bump_map($drawable, 135, 45, 5, 0, 0, 0, 0, 1, 0, 0); + $drawable->plug_in_bump_map($gridlayer, 135, 45, 5, 0, 0, 0, 0, 1, 0, 0); + +# then create a new, clean grid, and bumpmap the pixelized layer with it + $img->selection_all; + $cleangrid = $img->layer_new($img->width, $img->height, + RGBA_IMAGE, "Grid 2", 100, 0); + $img->add_layer($cleangrid,0); + gimp_edit_fill($cleangrid); + $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); + $img->selection_all; + +# Clean up stuff + + $img->remove_layer($cleangrid); +# $cleangrid->delete; # Deleting these layers after removal seems to cause + # strange problems (I think gimp handles this + # automatically now) + $img->remove_layer($gridlayer); +# $gridlayer->delete; + gimp_selection_load($selection); + gimp_palette_set_background($oldbackground); + if ($selection_flag ==1) { + $img->selection_none; + } + eval { $img->undo_push_group_end }; + return (); +}; + +exit main; + diff --git a/plug-ins/perl/examples/xachshadow b/plug-ins/perl/examples/xachshadow new file mode 100755 index 0000000000..9f1785f794 --- /dev/null +++ b/plug-ins/perl/examples/xachshadow @@ -0,0 +1,87 @@ +#!/usr/bin/perl + +eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' + if 0; # not running under some shell +# by Seth Burgess + +#[Xach] start off with an image, then pixelize it +#[Xach] then add alpha->add layer mask [20:21] +#[Xach] render a checkerboard into the layer mask +#[Xach] duplicate the image. fill the original with black, then blur the layer +# mask (i used 30% of pixelize size) and offset it by some value (i +# chose 20% of the pixelize size) +#[Xach] duplicate the duplicate, remove the layer mask, move it below everything +#[Xach] then add a new white layer on top, set the mode to multiply, and render +# a grid into it at pixelize size +#[Xach] that's a bit roundabout, but it's also in the xcf +# +# Because the way xach does it is a bit ackward, I'm switching it around a bit +# and working from the bottom up.. + +# Revision 1.1: Marc Lehman added undo capability +# Revision 1.2: Marc Lehman , changed function name +# Revision 1.3: Seth Burgess , changed location and +# added my email address +# +# Here's the boring start of every script... + +use Gimp qw(:auto __ N_); +use Gimp::Fu; + +register "xach_shadows", + "Xach's Shadows o' Fun", + "Screen of 50% of your drawing into a dropshadowed layer.", + "Seth Burgess", + "Seth Burgess ", + "2-15-98", + N_"/Filters/Map/Xach Shadows...", + "RGB*, GRAY*", + [ + [PF_SLIDER, "block_size", "The size of the blocks...", 10, [0, 255, 1]], + ], + sub { + my($img,$drawable,$blocksize) =@_; + + eval { $img->undo_push_group_start }; + # $selection_flag = 0; + if (!$drawable->has_alpha) { + $drawable->add_alpha; + }; +# This only can be applied to an entire image right now.. +# $selection = $img->selection_save; + $img->selection_all; + $oldbackground = gimp_palette_get_background(); +# Now the fun begins :) + $drawable->plug_in_pixelize($blocksize); + $shadowlayer = $drawable->layer_copy(0); + $img->add_layer($shadowlayer,0); + $checkmask = $shadowlayer->create_mask(WHITE_MASK); + $img->add_layer_mask($shadowlayer, $checkmask); + plug_in_checkerboard ($img, $checkmask, 0, $blocksize); + + $frontlayer = $shadowlayer->layer_copy(0); + $img->add_layer($frontlayer,0); + gimp_palette_set_background([0,0,0]); + $shadowlayer->fill(BG_IMAGE_FILL); + $checkmask->plug_in_gauss_iir(0.3*$blocksize, 1, 1); + gimp_channel_ops_offset ($checkmask, 1, 0, 0.2*$blocksize, 0.2*$blocksize); + + + $gridlayer = $img->layer_new($img->width, $img->height, RGBA_IMAGE, "Grid 1", 100, 0); + $img->add_layer($gridlayer,0); + $img->selection_all; + gimp_edit_clear($gridlayer); + gimp_palette_set_background([255,255,255]); + gimp_edit_fill($gridlayer); + $gridlayer->plug_in_grid((1, $blocksize, 0, [0,0,0], 255) x 3); + + gimp_layer_set_mode($gridlayer, 3); +# Clean up stuff + gimp_palette_set_background($oldbackground); + eval { $img->undo_push_group_end }; + gimp_displays_flush(); + return(); +}; + +exit main; + diff --git a/plug-ins/perl/examples/xachvision b/plug-ins/perl/examples/xachvision new file mode 100755 index 0000000000..db94086eb6 --- /dev/null +++ b/plug-ins/perl/examples/xachvision @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +# Once again, an effect of Xach's +# Created by Seth Burgess + +use Gimp qw(:auto __ N_); +use Gimp::Fu; + +register "xachvision", + "Xach Survielence Camera/XachVision", + "This makes an interlaced-looking machine vision type thing.", + "Seth Burgess", + "Seth Burgess ", + "1999-02-28", + N_"/Filters/Noise/Xach Vision...", + "RGB*, GRAY*", + [ + [PF_COLOR, "color", "What Color to see the world in", [0, 255, 0]], + [PF_SLIDER, "added_noise", "How much noise to add", 25, [0,255,5]] + ], + sub { + my($img,$drawable,$color,$amt) =@_; + + eval { $img->undo_push_group_start }; + $oldbackground = gimp_palette_get_background(); + + $midlayer = $drawable->gimp_layer_copy(1); + $img->add_layer($midlayer, 0); + + $toplayer = $drawable->gimp_layer_copy(0); + $img->add_layer($toplayer, 0); + + gimp_palette_set_background($color); + $toplayer->edit_fill(); + $toplayer->set_mode(COLOR_MODE); + + gimp_palette_set_background([0,0,0]); + $drawable->edit_fill(); + + $amt = $amt/255; + $midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt); + $midmask = $midlayer->create_mask(0); + $img->add_layer_mask($midlayer, $midmask); + $midmask->plug_in_grid($img->height * 3, 3, 0, 0); + $midmask->plug_in_gauss_iir(1.01, 1, 1); + + gimp_palette_set_background($oldbackground); + eval { $img->undo_push_group_end }; + gimp_displays_flush(); + return(); +}; + +exit main; + diff --git a/plug-ins/perl/po/it.po b/plug-ins/perl/po/it.po index 5b443c695a..339558aae2 100644 --- a/plug-ins/perl/po/it.po +++ b/plug-ins/perl/po/it.po @@ -2,282 +2,35 @@ msgid "" msgstr "" "Project-Id-Version: gimp-perl 1\n" "POT-Creation-Date: 1999-09-12 17:58+0200\n" -"PO-Revision-Date: 1999-12-17 21:28-0200\n" +"PO-Revision-Date: 1999-09-16 21:28-0200\n" "Last-Translator: Daniele Medri \n" "Language-Team: http://gimp.linux.it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" -"Date: ven dic 17 02:12:22 CEST 1999\n" -"From: Daniele Medri \n" +"Date: mer set 8 02:12:22 CEST 1999\n" +"From: Marco Munari \n" -msgid "/Filters/Logulator/Starburst" -msgstr "/Filtri/Logulator/Starburst" +#, fuzzy +msgid "/Filters/Logulator/Bovination" +msgstr "/Filters/" -msgid "expected perl-server at other end of socket, got @r\n" -msgstr "attendendo il perl-server durante la connessione socket, si riceve @r\n" - -msgid "too many" -msgstr "troppi" - -msgid "$s: not an integer\n" -msgstr "$s: non e` un intero\n" +msgid "/Guides/Center Guide" +msgstr "/Guide/Linee guida" +#, fuzzy msgid "/Filters/Logulator/Blended" -msgstr "/Filtri/Logulator/Blended/" +msgstr "/Filters/" -msgid "Help for " -msgstr "Aiuto per " - -msgid "/Layers/Stack/Reorder Layers" -msgstr "/Layers/Pila/Riordina livelli" - -msgid "unsupported status code: %d, fatal error\n" -msgstr "codice di status non supportato: %d, errore fatale\n" - -msgid "illegal parasite specification, expected three array members" -msgstr "specificazione di parasite illegale, attesi tre membri di array" - -msgid "/Xtns/Render/Golden Mean" -msgstr "/Xtns/Render/Golden Mean" - -msgid "Last Modified" -msgstr "Ultima modifica" - -msgid "/Xtns/Visual Scriptor" -msgstr "/Xtns/Gestione Parasite" - -msgid "/Xtns/Render/Logos/Firetext" -msgstr "/Xtns/Render/Logo/Testo di fuoco" - -msgid "unable to read '$fn': $!" -msgstr "impossibile leggere '$fn': $!" - -msgid "/Xtns/Render/Povray/Texture" -msgstr "/Xtns/Render/Povray/Texture" - -msgid "/Filters/Logulator/Cool Metal" -msgstr "/Filters/Logulator/Metallico" - -msgid "/Xtns/Render/Povray/Preferences" -msgstr "/Xtns/Render/Povray/Preferenze" - -msgid "Unable to read temporary image tile $tmp: $!" -msgstr "Impossibile leggere il file temporaneo $tmp: $!" - -msgid "/Filters/Logulator/Crystal" -msgstr "/Filters/Logulator/Cristallo" - -msgid "/Filters/Logulator/Alien Glow" -msgstr "/Filters/Logulator/Alien Glow" - -msgid "run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n" -msgstr "" -"run_mode deve essere INTERACTIVE, NONINTERACTIVE oppure RUN_WITH_LAST_VALS\n" - -msgid "Font Selection Dialog ($desc)" -msgstr "Finestra di Selezione Font ($desc)" - -msgid "/Xtns/Render/Pixelgenerator" -msgstr "/Xtns/Render/Generatore Pixel" - -msgid "xlfd_unpack: unmatched XLFD '$fontname'\n" -msgstr "xlfd_unpack: carattere XLFD '$fontname' non riscontrato\n" - -msgid "/Filters/Noise/Xach Vision..." -msgstr "/Filters/Noise/Xach Vision..." - -# msgid "Internal error: Gimp::Net #100, please report!" -# msgstr "" -msgid "" -"$function: function name contains unusual characters, good style is to use only " -"0-9, a-z and _" -msgstr "" -"$function: il nome della funzione contiene caratteri inusuali, e` buono stile " -"usare solo 0-9, a-z e _" - -msgid "Help" -msgstr "Aiuto" - -msgid "unable to fork: $!" -msgstr "non riesco a compiere operazione fork: $!" - -msgid "FG" -msgstr "Primo Piano" +#, fuzzy +msgid "/Filters/Logulator/Basic I" +msgstr "/Filters/" msgid "FATAL: unable to create $tmp: $!\n" msgstr "FATALITA`: incapace di creare $tmp: $!\n" -msgid "/Guides/Guide Grid" -msgstr "/Guide/Griglia di Guide" - -msgid "dunno how to return param type %d" -msgstr "impossibile passare tipo di argomento %d" - -msgid "/Filters/Logulator/Chip Away" -msgstr "/Filters/Logulator/Chip Away" - -msgid "/Filters/Colors/Colour To Alpha" -msgstr "/Filtri/Colori/Colore a Alfa" - -msgid "/Filters/Logulator/Bovination" -msgstr "/Filters/Logulator/Bovination" - -msgid "Image Types" -msgstr "Tipi Immagine" - -msgid "/Filters/Colors/Fire" -msgstr "/Filters/Colors/Fuoco" - -msgid "could not connect to the gimp server (make sure Perl-Server is running)" -msgstr "" -"non posso collegarmi al server gimp (assicurarsi che il Perl-Server sia in " -"esecuzione)" - -msgid "More..." -msgstr "Altro..." - -msgid "/Filters/Logulator/Particle Trace" -msgstr "/Filtri/Logulator/Particle Trace" - -msgid "interface=... tag is no longer supported\n" -msgstr "interface=... non e` piu` supportato\n" - -msgid "Internal error: unable to convert reference in sv2net, please report!" -msgstr "" -"Errore interno: incapace di gestire argomento di tipoo '%c' in net2sv, per " -"cortesia riportare" - -msgid "Synopsis" -msgstr "Sinoposi" - -msgid "Plug-In Path" -msgstr "Percorso su disco per Plug-In" - -msgid "unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)" -msgstr "non riesco a convertire Gimp::Drawable in Gimp::GDrawable (id %d)" - -msgid "Restore values to the previous ones" -msgstr "Ripristina i valori a quelli precedenti" - -msgid "/Select/Triangle" -msgstr "/Select/Triangolo" - -msgid "/Xtns/Render/Stamps" -msgstr "/Xtns/Render/Francobolli" - -msgid "Illegal default font description for $function: $val\n" -msgstr "Font descriprion di default illegale per $function: $val\n" - -msgid "parameter '$entry->[1]' is not optional\n" -msgstr "parametro '$entry->[1]' non e` opzionale\n" - -msgid "-*-courier-medium-r-normal--*-120-*-*-*-*-*" -msgstr "-*-courier-medium-r-normal--*-120-*-*-*-*-*" - -# msgid "Internal error: unable to convert reference in sv2net, please report!" -# msgstr "" -msgid "/Xtns/Render/Random Art #1" -msgstr "/Xtns/Render/Arte casuale #1" - -msgid "WARNING: client tried to unlock without holding a lock" -msgstr "" -"ATTENZIONE: il client ha tentato di sbloccare pur non trovando nessun vincolo" - -msgid "register called with too many or wrong arguments\n" -msgstr "registro chiamato con troppy o sbagliati argomenti\n" - -msgid "Internal error: Gimp::Net #101, please report!" -msgstr "Errore Interno: Gimp::Net #101." - -msgid "/Filters/Web/Webify" -msgstr "/Filtri/Varie/Webify" - -msgid "" -"malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE" -msgstr "" -"paramdef malspecificato, atteso [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] o " -"PARAM_TYPE" - -msgid "" -"gimp_pixel_rgns_register supports only 1, 2 or 3 arguments, upgrade to gimp-1.1 " -"and report this error" -msgstr "" -"gimp_pixel_rgns_register supporta solo 1, 2 o 3 argomenti, aggiornare a gimp-1.1 " -"e riportare questo errore" - -msgid "last argument to gimp_pattern_select_widget must be scalar ref" -msgstr "" -"l'ultimo argomento di gimp_pattern_select_widget deve essere un riferinmento " -"scalare" - -msgid "" -"\n" -"\n" -"EMBEDDED POD DOCUMENTATION:\n" -"\n" -msgstr "" -"\n" -"\n" -"DOCUMENTAZIONE POD INTEGRATA:\n" -"\n" - -msgid "Internal error: stashname too long, please report!" -msgstr "Errore interno: stashname troppo lungo!" - -msgid "/Filters/Render/TeX String" -msgstr "/Filtri/Render/Stringa TeX" - -msgid "Fileselector for $name" -msgstr "Selettore di file per $name" - -msgid "unable to create listening unix socket: $!\n" -msgstr "impossibile creare socket di connessione unix: $!\n" - -msgid ", %d bytes data]" -msgstr ", %d bytes per dati]" - -msgid "server requests authorization, but no authorization available\n" -msgstr "il server richiede autorizzazioni che non sono state passate\n" - -msgid "pdl height != region height" -msgstr "altezza pdl differisce da altezza regione" - -msgid "Internal error: unable to handle argtype '%c' in net2sv, please report!" -msgstr "" -"Errore interno: incapace di gestire argomento di tipoo '%c' in net2sv, per " -"cortesia riportare" - -msgid "Close" -msgstr "Chiudi" - -msgid "unable to open $rgb_db_path" -msgstr "non riesco ad aprire $rgb_db_path" - -msgid "/Filters/Colors/Map To Gradient" -msgstr "/Filtri/Colori/Mappa a Gradiente" - -msgid "/Filters/Render/Add Glow" -msgstr "/Filtri/Render/Aggiungi Glow" - -msgid "/Filters/Logulator/Basic I" -msgstr "/Filtri/Logulator/Basic I" - -msgid "required callback 'run' not found\n" -msgstr "richiesto callback non trovato\n" - -msgid "function name contains dashes instead of underscores" -msgstr "nome di funzione contiene cancelletti ('#') anziche` '_'" - -msgid "required callback 'query' not found\n" -msgstr "richiesto callback non trovato\n" - -msgid "" -"$function: argument name '$p->[1]' contains illegal characters, only 0-9, a-z " -"and _ allowed" -msgstr "" -"$function: nome di argumento '$p->[1]' contiene caratteri illegal, solo 0-9, a-z " -"and _ allowed" +msgid "/Xtns/Render/Logos/Inner Bevel" +msgstr "/Xtns/Render/Logos/Inner Bevel" msgid "" "Expected an INT32 but got '%s'. Add '*1' if you really intend to pass in a string" @@ -285,255 +38,8 @@ msgstr "" "Atteso un INT32 ma avuto '%s'. Aggiungere '*1' se realmente si vuole passare in " "una stringa" -msgid "invalid GIMP_HOST: 'spawn' is not a valid connection method for the server" -msgstr "" -"GIMP_HOST invalido: 'spawn' non e` un metodo di connessione valido per il server" - -msgid "unable to open Gimp::Net communications socket\n" -msgstr "impossibile aprire socket di comunicazione Gimp::Net\n" - -# preferibile Piano al posto di Livello -msgid "wrong authorization, aborting connection" -msgstr "Autorizzazione scorretta, ora interrompo la connessione" - -msgid "/Filters/Map/Image Tile" -msgstr "/Filtri/Map/Tile Immagine" - -msgid "WARNING" -msgstr "ATTENZIONE" - -msgid "Brush Selection Dialog" -msgstr "Schermata selezione punta" - -msgid "(none)" -msgstr "(niente)" - -msgid "/Script-Fu/Decor/Stampify" -msgstr "/Script-Fu/Decor/Stampify" - -msgid "/Filters/Distorts/BlowInOut" -msgstr "/Filtri/Distorts/BlowInOut" - -msgid "authorization required for tcp connections" -msgstr "autorizzazione richiesta per la connessione tcp" - -msgid "" -"Expected an INT32 but got '%s'. Maybe you meant '%s' instead and forgot to 'use " -"strict'" -msgstr "" -"Atteso un INT32 ma ottenuto '%s'. Forse intendevate %s e avete dimenticato 'use " -"strict'" - -msgid "[undefined]" -msgstr "[non definito]" - -# msgid "Internal error: stashname too long, please report!" -# msgstr "Errore interno: stashname troppo lungo, please report!" -msgid "/Guides/Remove Guides" -msgstr "/Guide/Rimuovi Guide" - -msgid "WARNING: shared locking requested but not implemented" -msgstr "ATTENZIONE: richiesta condivisa di lock, ma non implementata" - -msgid "/Filters/Logulator/SOTA Chrome" -msgstr "/Filtri/Logulator/SOTA Chrome" - -msgid "%s: procedural database execution failed" -msgstr "%s: fallimento di esecuzione database procedurale" - -msgid "/Filters/Logulator/3D Outline" -msgstr "/Filtri/Logulator/3D Outline" - -msgid "/Filters/" -msgstr "/Filtri/" - -msgid ", authorization required" -msgstr ", autorizzazione richiesta" - -msgid "unable to create socketpair for gimp communications: $!" -msgstr "non riesco a creare soketpair per comunicazioni gimp: $!" - -msgid "trying to start gimp with options \"$opt\"\n" -msgstr "ora provo ad eseguire gimp con le opzioni \"$opt\"\n" - -msgid "menupath _must_ start with , , , or !" -msgstr "" -"menupath _deve_ cominciare con , , , or !" - -msgid "/Xtns/Perl/Server" -msgstr "/Xtns/Perl/Server" - -msgid "accepted unix connection" -msgstr "connessione unix accettata" - -msgid "/Filters/Logulator/Imigre-26" -msgstr "/Filtri/Logulator/Imigre-26" - -msgid "gimp_tile_get_data is not yet implemented\n" -msgstr "gimp_tile_get_data non e` ancora implementata\n" - -msgid "dunno how to pass arg type %d" -msgstr "impossibile passare tipo di argomento %d" - -msgid "Browse" -msgstr "Esplora" - -msgid "received QUIT request" -msgstr "richiesta di abbandono (QUIT) ricevuta" - -msgid "unable to create '$fn': $!" -msgstr "non in grado di creare '$fn': $!" - -msgid "Author" -msgstr "Autore" - -msgid "unable to create listening tcp socket: $!\n" -msgstr "non riesco a creare connessione tcp socket di ascolot: $!\n" - -msgid "-*-helvetica-medium-r-normal-*-34-*-*-*-p-*-iso8859-1" -msgstr "-*-helvetica-medium-r-normal-*-34-*-*-*-p-*-iso8859-1" - -msgid "" -"BLURB:\n" -"\n" -"$blurb\n" -"\n" -"HELP:\n" -"\n" -"$help" -msgstr "" -"BLURB:\n" -"\n" -"$blurb\n" -"\n" -"GUIDA:\n" -"\n" -"$help" - -msgid "/Filters/Distorts/Windify" -msgstr "/Filtri/Distorsione/Effetto Vento" - -# msgid "Unable to grok '%s' as colour specifier" -# msgstr "" -# grok -msgid "OK" -msgstr "OK" - -msgid "gimp_tile_set_data is not yet implemented\n" -msgstr "gimp_tile_set_data non e` ancora implementato\n" - -msgid "argument incompatible with type IMAGE" -msgstr "argomento incompatibile con tipo IMAGE" - -msgid "accepting connections on port $port" -msgstr "ora accetto connessioni alla porta $port" - -msgid "Internal error: Gimp::Net #100, please report!" -msgstr "Errore Interno: Gimp::Net #100." - -msgid "/Select/Round Rectangular Selection" -msgstr "/Select/Selezione Rettangolare arrotondata" - -msgid "/Edit/Repeat & Duplicate" -msgstr "/Edit/Ripeti e Duplica" - -msgid "Description" -msgstr "Descrizione" - -msgid "params and return_vals must be array refs (even if empty)!" -msgstr "" -"i parametri ed i valori di ritorno devono essere riferimenti ad array (anche " -"quando vuoti)!" - -msgid "/Filters/Logulator/Newsprint text" -msgstr "/Filtri/" - -msgid "/Filters/Render/Fit Text..." -msgstr "/Filtri/Render/Riempito da Testo" - -msgid "$_: illegal switch, try $0 --help\n" -msgstr "$_: switch illegale, provare $0 --help\n" - -msgid "Unable to convert a reference to type '%s'" -msgstr "Incapace di convertire un riferimento a tipo '%s'" - -msgid "/Xtns/Render/Logos/Inner Bevel" -msgstr "/Xtns/Render/Logos/Inner Bevel" - -msgid "/Filters/Render/Random Blends" -msgstr "/Filtri/Render/Sfumature Casuali" - -msgid "/Filters/Map/Pixelmap" -msgstr "/Filtri/Map/Pixelmap" - -msgid "/Filters/Logulator/Starscape" -msgstr "/Filtri/" - -msgid "/Filters/Apply Perl Expression..." -msgstr "/Filtri/Animazione/Applica Espressione Perl" - -msgid "gimp procedure '%s' not found" -msgstr "procedura di gimp '%s' non trovata" - -msgid "Visual Scriptor" -msgstr "" - -msgid "server going down..." -msgstr "arresto del server..." - -msgid "Saving '$filename' as COLORHTML..." -msgstr "" - -msgid "unable to read temporary file $tmp: $!" -msgstr "non riesco a leggere il file temporaneo $tmp: $!" - -msgid "being called as '%s', but '%s' not registered in the pdb" -msgstr "being called as '%s', but '%s' not registered in the pdb" - -msgid "Shortcuts" -msgstr "Scorciatoie" - -msgid "/Filters/Render/Terral Text" -msgstr "/Filtri/Render/Terral Text" - -msgid "/Filters/Logulator/Speed text" -msgstr "/Filtri/" - -msgid "/Xtns/PDB Explorer" -msgstr "/Xtns/Esploratore PDB" - -msgid "/Xtns/Create_Images" -msgstr "/Xtns/Crea_Immagine" - -msgid "9x15bold" -msgstr "9x15bold" - -msgid "unauthorized command received, aborting connection" -msgstr "ricevuto comando di mancata autorizzazione, chiudo connessione" - -msgid "%s: procedural database execution failed on invalid input arguments" -msgstr "" -"%s: fallimento di esecuzione database procedurale su argomenti individuali di " -"ingresso" - -msgid "NAME" -msgstr "NOME" - -msgid "WARNING: $function returned something that is not an image: \"$img\"\n" -msgstr "" -"ATTENZIONE: $function ha ritornato qualcosa che non e` una immagine: \"$img\"\n" - -msgid "/Filters/Map/Xach Blocks" -msgstr "/Filtri/Map/Xach Blocks" - -msgid "/Filters/Logulator/Frosty" -msgstr "/Filtri/Logulator/Frosty" - -msgid "FATAL: canonicalize_colour did not return a value!" -msgstr "Avviso: canonicalize_colour non ha ricevuto nessun valore!" - -msgid "export failed" -msgstr "esportazione fallita" +msgid "/Filters/Noise/Feedback" +msgstr "/Filters/Noise/Feedback" msgid "" " interface-arguments are\n" @@ -546,23 +52,148 @@ msgstr "" " -i | --interact permette all'utente di prima interagire\n" " script-argiments sono\n" -msgid "/Filters/Edge-Detect/2x2 Edge Detect" -msgstr "/Filtri/Edge-Detect/2x2 Individuazione Contorni" +msgid "being called as '%s', but '%s' not registered in the pdb" +msgstr "being called as '%s', but '%s' not registered in the pdb" -msgid "/Layers/Center Layer" -msgstr "/Livelli/Centra Livello" +# notr +msgid "argument type %s expected (not %s)" +msgstr "atteso argomento di tipo %s (non %s)" -msgid "closing connection %d (%d requests in %g seconds)" -msgstr "ora chiudo connessione %d (%d richiesto in %g secondi)" +msgid "Browse" +msgstr "Esplora" -msgid "/Filters/Logulator/Basic II" -msgstr "/Filtri/Logulator/Basic II" +#, fuzzy +msgid "/Filters/Logulator/Glowing Hot" +msgstr "/Filters/" msgid "Reset all values to their default" msgstr "Reimposta a valori standard" -msgid "/Xtns/Gimp::Fu Example" -msgstr "/Xtns/Esempio Gimp::Fu" +msgid "WARNING: client tried to unlock without holding a lock" +msgstr "" +"ATTENZIONE: il client ha tentato di sbloccare pur non trovando nessun vincolo" + +msgid "$_: illegal switch, try $0 --help\n" +msgstr "$_: switch illegale, provare $0 --help\n" + +#, fuzzy +msgid "required callback 'run' not found\n" +msgstr "callback '$cb' richiesto e non trovato\n" + +msgid "/Xtns/Render/Logos/Glowing Steel" +msgstr "/Xtns/Render/Logos/Inner Bevel" + +msgid "Brush Selection Dialog" +msgstr "Schermata selezione punta" + +msgid "gimp procedure '%s' not found" +msgstr "procedura di gimp '%s' non trovata" + +msgid "Pattern Selection Dialog" +msgstr "Schermata selezione Motivo di riempimento" + +#, fuzzy +msgid "/Filters/Web/Perl-o-tine..." +msgstr "/Guide/Perl-o-tine" + +msgid "function '$exe' not found in this script (must be one of " +msgstr "funzione '$exe' non trovata in questo script (deve essere una de " + +# #ma come e` stato creato 'sto file???? +msgid "pixel size mismatch, pdl has %d channel pixels but %d channels are required" +msgstr "" +"grandezza dei pixel non prevista, pdl ha %d pixel di canali ma sono richiesti %d " +"canali" + +msgid "Load" +msgstr "Carico" + +#, fuzzy +msgid "/Filters/Logulator/Basic II" +msgstr "/Filters/" + +msgid "illegal parasite specification, reference expected" +msgstr "specifica di parametro aggiuntivo illegale, riferimento atteso" + +msgid "Date/Version" +msgstr "Data/Versione" + +msgid "Status" +msgstr "Status" + +msgid "/Layers/Center Layer" +msgstr "/Layers/Centra Livello" + +# preferibile Piano al posto di Livello +msgid "wrong authorization, aborting connection" +msgstr "Autorizzazione scorretta, ora interrompo la connessione" + +msgid "BG" +msgstr "Colore Sfondo" + +msgid "internal error (please report): too many main arguments" +msgstr "Errore interno (please report): troppi argomenti di main" + +msgid "use'ing Gimp::PDL is no longer necessary, please remove it!\n" +msgstr "l'uso di Gimp:PDL non e` piu` necessario, rimuovetelo pure!\n" + +msgid "/Filters/Colors/Fire" +msgstr "/Filters/Colors/Fuoco" + +msgid "illegal type for colour specification" +msgstr "colore specificato di tipo illegale" + +#, fuzzy +msgid "/Xtns/Render/Bricks" +msgstr "/Xtns/Render/Francobolli" + +msgid "xlfd_unpack: unmatched XLFD '$fontname'\n" +msgstr "xlfd_unpack: carattere XLFD '$fontname' non riscontrato\n" + +msgid "Internal error: unable to convert reference in sv2net, please report!" +msgstr "" +"Errore interno: incapace di gestire argomento di tipoo '%c' in net2sv, per " +"cortesia riportare" + +msgid "Plug-In Path" +msgstr "Percorso su disco per Plug-In" + +msgid "accepted unix connection" +msgstr "connessione unix accettata" + +msgid "server going down..." +msgstr "arresto del server..." + +msgid "trying to start gimp with options \"$opt\"\n" +msgstr "ora provo ad eseguire gimp con le opzioni \"$opt\"\n" + +msgid "/Filters/Noise/Ditherize" +msgstr "/Filters/Noise/Ditherize" + +msgid "expected perl-server at other end of socket, got @r\n" +msgstr "attendendo il perl-server durante la connessione socket, si riceve @r\n" + +msgid "pdl height != region height" +msgstr "altezza pdl differisce da altezza regione" + +msgid "received QUIT request" +msgstr "richiesta di abbandono (QUIT) ricevuta" + +#, fuzzy +msgid "/Filters/Web/Webify" +msgstr "/Filters/Misc/Webify" + +msgid "/Xtns/PDB Explorer" +msgstr "/Xtns/Esploratore PDB" + +msgid " = [argument error]\n" +msgstr " = [argomento errato]\n" + +msgid "%s arguments for function '%s'" +msgstr "%s argomenti per funzione '%s'" + +msgid " matching functions" +msgstr " abbinando funzioni" msgid "" "Usage: $0 [gimp-args..] [interface-args..] [script-args..]\n" @@ -583,123 +214,245 @@ msgstr "" " (per maggiori informazioni, vedere " "Gimp::Net(3))\n" -msgid "too many arguments" -msgstr "troppi argomenti" +msgid "/Filters/Animation/Animate Cells" +msgstr "/Filters/Animazione/Animazione Celle" -msgid "dimension mismatch, pdl has dimension %d but at most %d dimensions allowed" -msgstr "" -"dimensione non prevista, pdl ha dimensione %d ma al piu` sono permesse %d " -"dimensioni" +#, fuzzy +msgid "/Filters/Logulator/Starburst" +msgstr "/Filters/" -msgid "Load" -msgstr "Carico" +#, fuzzy +msgid "/Filters/Logulator/SOTA Chrome" +msgstr "/Filters/" -msgid "unable to grok colour specification" -msgstr "impossibile accettare specificazione di colore" +msgid "%s: procedural database execution failed" +msgstr "%s: fallimento di esecuzione database procedurale" -msgid "" -"the gtk perl module is required to open a dialog\n" -"window, running with default values" -msgstr "" -"il module gtk perl e` richiesto per aprire una finestra di dialogo,\n" -"proseguo l'esecuzione con i valori preimpostati" +msgid "authorization required for tcp connections" +msgstr "autorizzazione richiesta per la connessione tcp" -msgid "no additional information available, use --help\n" -msgstr "informazioni addizionali non disponibili, usare --help\n" +msgid "/Xtns/Perl/Server" +msgstr "/Xtns/Perl/Server" -msgid " matching functions" -msgstr " abbinando funzioni" - -msgid "Gradient Selection Dialog" -msgstr "Finestra di Selezione Gradiente" +msgid "function name contains dashes instead of underscores" +msgstr "nome di funzione contiene cancelletti ('#') anziche` '_'" msgid "authorization ok, but: $r[1]\n" msgstr "autorizzazione accettata, ma : $r[1]\n" -msgid "function/macro \"$name\" not found in $class" -msgstr "funzione/macro \"$name\" non trovata in $class" +msgid "/Filters/Render/Highlight Edges" +msgstr "/Filters/Render/Evidenzia contorni" -msgid "Cannot call '$AUTOLOAD' at this time" -msgstr "Ora non posso chiamare '$AUTOLOAD'" +msgid "a color must have three components (array elements)" +msgstr "un colore deve avere tree componenti (elementi array)" -msgid "/Xtns/Render/Yin-Yang" -msgstr "/Xtns/Render/Yin-Yang" +msgid "/Xtns/Render/Pixelgenerator" +msgstr "/Xtns/Render/Generatore Pixel" -msgid "arguments to main not yet supported!" -msgstr "argomenti a main non ancora supportati!" +#, fuzzy +msgid "/Filters/Web/Prepare for GIF" +msgstr "/Filters/Misc/Prepara per GIF" -msgid "accepting connections in $host" -msgstr "ora accetto connessioni in $host" - -msgid "FATAL: Gimp::Compat version mismatch\n" -msgstr "Avviso: la versione di Gimp::Compat non corrisponde a quella attesa\n" - -msgid " (press Tab to complete)" -msgstr " (premere Tab per completare)" - -msgid "Save $name" -msgstr "Salva $name" - -msgid " plug-in called without both image and drawable arguments!\n" -msgstr " plug-in chiamato senza argomenti dell'image e della figura!\n" - -msgid "illegal type for colour specification" -msgstr "colore specificato di tipo illegale" - -msgid "get current background colour from the gimp" -msgstr "ottiene il corrente colore di sfondo da gimp" - -msgid "" -"Internal error: asked to deobjectify an object not in the cache, please report!" -msgstr "" -"Errore interno: incapace di gestire argomento di tipoo '%c' in net2sv, per " -"cortesia riportare" - -msgid "/Xtns/Render/Font Table" -msgstr "/Xtns/Render/Tabella Caratteri" - -msgid "No horizontal or vertical guides found. Aborted." -msgstr "" - -msgid "/Filters/Logulator/Glowing Hot" -msgstr "/Filtri/Logulator/Glowing Hot" - -msgid "accepting connections on port $Gimp::Net::default_tcp_port" -msgstr "ora accetto connessioni alla porta $Gimp::Net::default_tcp_port" - -msgid "Menu Path" -msgstr "Percorso del Menu" +msgid "$_: unknown/illegal file-save option" +msgstr "$_: opzione salvataggio-file sconosciuta/illegale" # grok ? msgid "TYPE" msgstr "TIPO" -msgid "/Guides/To Selection" -msgstr "/Guide/A Selezione" +msgid "Gradient Selection Dialog" +msgstr "Finestra di Selezione Gradiente" -msgid "/Filters/Noise/Feedback" -msgstr "/Filtri/Noise/Feedback" +msgid "Function Info" +msgstr "Info Funzione" -msgid "/Filters/Distorts/MirrorSplit" -msgstr "/Filtri/Distorsioni/Divide Specchiato" +msgid "unable to open $rgb_db_path" +msgstr "non riesco ad aprire $rgb_db_path" -msgid "/Xtns/Animation/Billboard" -msgstr "/Xtns/Animazione/Billboard" +#, fuzzy +msgid "/Filters/Logulator/Imigre-26" +msgstr "/Filters/" + +msgid "/Select/Round Rectangular Selection" +msgstr "/Select/Selezione Rettangolare arrotondata" + +msgid "/Filters/Map/Pixelmap" +msgstr "/Filters/Map/Pixelmap" + +msgid "no additional information available, use --help\n" +msgstr "informazioni addizionali non disponibili, usare --help\n" + +msgid "/Filters/Render/Brushed Metal" +msgstr "/Filters/Render/Punte metallizzate" + +msgid "gimp_tile_set_data is not yet implemented\n" +msgstr "gimp_tile_set_data non e` ancora implementato\n" + +msgid "Visual Scriptor" +msgstr "" + +msgid "No horizontal or vertical guides found. Aborted." +msgstr "" + +msgid "/Filters/Map/Image Tile" +msgstr "/Filters/Map/Tile Immagine" + +msgid "Internal error: stashname too long, please report!" +msgstr "Errore interno: stashname troppo lungo!" + +#, fuzzy +msgid "/Filters/Logulator/Comic Book" +msgstr "/Filters/" + +# msgid "Internal error: stashname too long, please report!" +# msgstr "Errore interno: stashname troppo lungo, please report!" +msgid "/Guides/Remove Guides" +msgstr "/Guide/Rimuovi Guide" + +msgid "Internal error: Gimp::Net #101, please report!" +msgstr "Errore Interno: Gimp::Net #101." + +msgid "get current background colour from the gimp" +msgstr "ottiene il corrente colore di sfondo da gimp" + +msgid "WARNING: shared locking requested but not implemented" +msgstr "ATTENZIONE: richiesta condivisa di lock, ma non implementata" + +msgid "parameter '$entry->[1]' is not optional\n" +msgstr "parametro '$entry->[1]' non e` opzionale\n" + +msgid "$s: not an integer\n" +msgstr "$s: non e` un intero\n" + +msgid "unable to read '$fn': $!" +msgstr "incapace di leggere '$fn': $!" + +msgid "/Xtns/Perl/Control Center" +msgstr "/Xtns/Perl/Centro di controllo" + +msgid "[undefined]" +msgstr "[non definito]" + +msgid "function/macro \"$name\" not found in $class" +msgstr "funzione/macro \"$name\" non trovata in $class" + +msgid "accepted tcp connection from " +msgstr "accettata connessione tcp da " + +msgid "/Layers/Stack/Reorder Layers" +msgstr "/Layers/Pila/Riordina livelli" + +msgid "illegal parasite specification, expected three array members" +msgstr "specificazione di parasite illegale, attesi tre membri di array" + +msgid "unable to read temporary file $tmp: $!" +msgstr "non riesco a leggere il file temporaneo $tmp: $!" + +msgid "PDB Explorer - the olof edition (yet still an alpha version)" +msgstr "PDB Explorer - edizione olof (versione alpha)" + +msgid "Illegal default font description for $function: $val\n" +msgstr "Font descriprion di default illegale per $function: $val\n" + +#, fuzzy +msgid "/Filters/Logulator/Chalk" +msgstr "/Filters/" + +#, fuzzy +msgid "/Filters/Render/Stampify" +msgstr "/Filters/Render/Stringa TeX" + +msgid "unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)" +msgstr "non riesco a convertire Gimp::Drawable in Gimp::GDrawable (id %d)" + +msgid "" +"BLURB:\n" +"\n" +"$blurb\n" +"\n" +"HELP:\n" +"\n" +"$help" +msgstr "" +"BLURB:\n" +"\n" +"$blurb\n" +"\n" +"GUIDA:\n" +"\n" +"$help" + +msgid "Fileselector for $name" +msgstr "Selettore di file per $name" + +msgid "accepting connections on port $port" +msgstr "ora accetto connessioni alla porta $port" msgid "/Filters/Misc/Border Average" -msgstr "/Filtri/Varie/Media Bordo" +msgstr "/Filters/Misc/Media Bordo" -msgid "You need at least 2 layers to perform prep4gif" -msgstr "Avete bisogno almeno di 2 livelli per utilizzare prep4gif" +# msgid "Internal error: Gimp::Net #100, please report!" +# msgstr "" +msgid "" +"$function: function name contains unusual characters, good style is to use only " +"0-9, a-z and _" +msgstr "" +"$function: il nome della funzione contiene caratteri inusuali, e` buono stile " +"usare solo 0-9, a-z e _" -msgid "/Filters/Blur/2x2 Blur" -msgstr "/Filtri/Sfocatura/2x2 Sfocatura" +msgid "menupath _must_ start with , , , or !" +msgstr "" +"menupath _deve_ cominciare con , , , or !" -msgid "/Layers/Layer to Image Size" -msgstr "/Livelli/Porta a Grandezza Immagine" +msgid "/Filters/Render/Terral Text" +msgstr "/Filters/Render/Terral Text" -msgid "conversion to type $pf_type2string{$type} is not yet implemented\n" -msgstr "conversione a tipo $pf_type2string{$type} non e` ancora implementata\n" +msgid "/Xtns/Render/Povray/Texture" +msgstr "/Xtns/Render/Povray/Texture" + +msgid "register called with too many or wrong arguments\n" +msgstr "registro chiamato con troppy o sbagliati argomenti\n" + +msgid "params and return_vals must be array refs (even if empty)!" +msgstr "" +"i parametri ed i valori di ritorno devono essere riferimenti ad array (anche " +"quando vuoti)!" + +msgid "$_ is not a valid import tag for package $pkg" +msgstr "$_ non e` un tag valido per importare il pacchetto $pkg" + +msgid "/Xtns/Render/Yin-Yang" +msgstr "/Xtns/Render/Yin-Yang" + +msgid "unable to accept unix connection: $!\n" +msgstr "impossibile accettare connessioni unix: $!\n" + +msgid "Save" +msgstr "Salva" + +msgid "" +"\n" +"\n" +"EMBEDDED POD DOCUMENTATION:\n" +"\n" +msgstr "" +"\n" +"\n" +"Documentazione POD associata:\n" +"\n" + +msgid "" +"the gtk perl module is required to run\n" +"this plug-in in interactive mode\n" +msgstr "" +"il module perl gtk e` richiesto per eseguire\n" +"questo plug-in nel modo interattivo\n" + +msgid "/Xtns/Render/Golden Mean" +msgstr "/Xtns/Render/Golden Mean" + +msgid "/Filters/Distorts/BlowInOut" +msgstr "/Filters/Distorts/BlowInOut" # msgid "dunno how to pass arg type %d" # msgstr "come passare il tipo di argomenti %d" @@ -707,14 +460,72 @@ msgstr "conversione a tipo $pf_type2string{$type} non e` ancora implementata\n" msgid "interface '$interface_type' unsupported." msgstr "interfaccia '$interface_type' non supportata.'" -msgid "/Filters/Logulator/Neon" -msgstr "/Filtri/Logulator/Neon" +msgid "unable to accept tcp connection: $!\n" +msgstr "non riesco ad accettare connessione tcp: $!\n" -msgid "/Filters/Enhance/2x2 Contrast Enhance" -msgstr "/Filtri/Avanzato/2x2 Rafforza Contrasto" +#, fuzzy +msgid "/Filters/Logulator/3D Outline" +msgstr "/Filters/" -msgid " plug-in called without the 3 standard arguments!\n" -msgstr " plug-in chiamato senza i 3 argomenti standard!\n" +msgid "" +"dimension mismatch, pdl has dimension %d but at least %d dimensions required" +msgstr "" +"dimensioni sbagliate, pdl ha dimensione %d ma e` richiesta almeno una dimensione " +"pari a %d" + +msgid "[unfinished]\n" +msgstr "[non finito]\n" + +msgid "could not connect to the gimp server (make sure Perl-Server is running)" +msgstr "" +"non posso collegarmi al server gimp (assicurarsi che il Perl-Server sia in " +"esecuzione)" + +msgid "/Xtns/Gimp::Fu Example" +msgstr "/Xtns/Esempio Gimp::Fu" + +#, fuzzy +msgid "/Filters/Logulator/Crystal" +msgstr "/Filters/" + +msgid "Cannot call '$AUTOLOAD' at this time" +msgstr "Ora non posso chiamare '$AUTOLOAD'" + +msgid "/Guides/Guide Grid" +msgstr "/Guide/Griglia di Guide" + +msgid "unauthorized command received, aborting connection" +msgstr "ricevuto comando di mancata autorizzazione, chiudo connessione" + +msgid "Defaults" +msgstr "Preimpostati" + +msgid "/Image/Colors/Alpha2Color" +msgstr "/Immagine/Colori/Alfa a Colore" + +msgid "text string is empty" +msgstr "stringa di testo vuota" + +msgid "server requests authorization, but no authorization available\n" +msgstr "il server richiede autorizzazioni che non sono state passate\n" + +msgid "/Xtns/Render/Logos/Firetext" +msgstr "/Xtns/Render/Logo/Testo di fuoco" + +msgid "/Filters/" +msgstr "/Filters/" + +msgid "Image Types" +msgstr "Tipo Immagine" + +msgid "/Filters/Map/Xach Blocks" +msgstr "/Filters/Map/Xach Blocks" + +msgid "Menu Path" +msgstr "Percorso del Menu" + +msgid "9x15bold" +msgstr "9x15bold" msgid "Unable to grok '%s' as colour specifier" msgstr "incapace di accettare specificazione di colore" @@ -722,44 +533,317 @@ msgstr "incapace di accettare specificazione di colore" msgid "gimp-perl-pixel functions require the PDL::Core module" msgstr "la funzione gimp-perl-pixel richiede il modulo PDL:Core" -msgid "a color must have three components (array elements)" -msgstr "un colore deve avere tree componenti (elementi array)" +msgid "Accelerator" +msgstr "Acceleratore" -msgid "Defaults" -msgstr "Preimpostati" +msgid "dunno how to return param type %d" +msgstr "impossibile passare tipo di argomento %d" -msgid "Copyright" -msgstr "Copyright" - -msgid "/Xtns/Render/Bricks" -msgstr "/Xtns/Render/Francobolli" - -msgid "/Filters/Render/Burst..." -msgstr "/Filtri/Render/Punte metallizzate" - -msgid "WARNING: client disconnected while holding an active lock\n" -msgstr "ATTENZIONE: sconnessione client durante un lock attivo\n" - -msgid "server version $Gimp::VERSION started" -msgstr "versione del server $Gimp::VERSION avviata" - -msgid "argument is not of type %s" -msgstr "argomeno non del tipo %s" - -msgid "/Filters/Distorts/Scratches" -msgstr "/Filtri/Distorsione/Graffiatura" - -msgid "%s arguments for function '%s'" -msgstr "%s argomenti per funzione '%s'" - -msgid "/Xtns/Render/Logos/Glowing Steel" -msgstr "/Xtns/Render/Loghi/Glowing Stell" +msgid "Cancel" +msgstr "Cancella" msgid "only blessed scalars accepted here" msgstr "qui si accettano solo scalari" -msgid "/Guides/Center Guide" -msgstr "/Guide/Guida Centrata" +msgid "Internal error: unable to handle argtype '%c' in net2sv, please report!" +msgstr "" +"Errore interno: incapace di gestire argomento di tipoo '%c' in net2sv, per " +"cortesia riportare" + +msgid "dimension mismatch, pdl has dimension %d but at most %d dimensions allowed" +msgstr "" +"dimensione non prevista, pdl ha dimensione %d ma al piu` sono permesse %d " +"dimensioni" + +#, fuzzy +msgid "/Filters/Logulator/Glossy" +msgstr "/Filters/" + +msgid "WARNING" +msgstr "ATTENZIONE" + +msgid "argument is not of type %s" +msgstr "argomeno non del tipo %s" + +msgid "Description" +msgstr "Descrizione" + +#, fuzzy +msgid "/Filters/Render/Fit Text..." +msgstr "/Filters/Render/Riempito da Testo" + +msgid "Unable to convert a reference to type '%s'" +msgstr "Incapace di convertire un riferimento a tipo '%s'" + +#, fuzzy +msgid "/Filters/Logulator/Particle Trace" +msgstr "/Filters/" + +msgid "argument incompatible with type IMAGE" +msgstr "argomento incompatibile con tipo IMAGE" + +msgid "/Filters/Blur/2x2 Blur" +msgstr "/Filters/Blur/2x2 Sfocatura" + +msgid "not enough" +msgstr "non abbastanza" + +#, fuzzy +msgid "/Filters/Render/Burst..." +msgstr "/Filters/Render/Punte metallizzate" + +msgid "-*-courier-medium-r-normal--*-120-*-*-*-*-*" +msgstr "-*-courier-medium-r-normal--*-120-*-*-*-*-*" + +msgid "Synopsis" +msgstr "Sinoposi" + +msgid "Color" +msgstr "Colore" + +#, fuzzy +msgid "/Filters/Logulator/Alien Glow" +msgstr "/Filters/" + +msgid "FATAL: canonicalize_colour did not return a value!" +msgstr "Avviso: canonicalize_colour non ha ricevuto nessun valore!" + +#, fuzzy +msgid "/Filters/Apply Perl Expression..." +msgstr "/Filters/Animation/Applica Espressione Perl" + +# msgid "FATAL: canonicalize_colour did not return a value!" +# msgstr "" +msgid "DESCRIPTION" +msgstr "DESCRIZIONE" + +msgid "Unable to open '$filename' for writing: $!\n" +msgstr "" + +msgid "/View/3D Surface" +msgstr "" + +msgid "accepting connections in $host" +msgstr "ora accetto connessioni in $host" + +msgid " plug-in called without the 5 standard arguments!\n" +msgstr " plug-in chiamato senza i 5 argomenti standard!\n" + +msgid "unable to create socketpair for gimp communications: $!" +msgstr "non riesco a creare soketpair per comunicazioni gimp: $!" + +msgid "unable to create '$fn': $!" +msgstr "non in grado di creare '$fn': $!" + +msgid "Previous" +msgstr "Precedente" + +msgid "WARNING: $function returned something that is not an image: \"$img\"\n" +msgstr "" +"ATTENZIONE: $function ha ritornato qualcosa che non e` una immagine: \"$img\"\n" + +msgid "Command" +msgstr "Comando" + +msgid "accepting connections on port $Gimp::Net::default_tcp_port" +msgstr "ora accetto connessioni alla porta $Gimp::Net::default_tcp_port" + +msgid "perl-arrayref required as datatype for a gimp-array" +msgstr "perl-arrayref richiesto come tipo di dati per gimp-array" + +#, fuzzy +msgid "required callback 'query' not found\n" +msgstr "callback '$cb' richiesto e non trovato\n" + +msgid "/Xtns/Create_Images" +msgstr "/Xtns/Crea_Immagine" + +msgid "Save $name" +msgstr "Salva $name" + +msgid "run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n" +msgstr "" +"run_mode deve essere INTERACTIVE, NONINTERACTIVE oppure RUN_WITH_LAST_VALS\n" + +msgid "/Video/VCR Console..." +msgstr "" + +msgid "/Filters/Edge-Detect/2x2 Edge Detect" +msgstr "/Filters/Edge-Detect/2x2 Individuazione Contorni" + +msgid "Copyright" +msgstr "Copyright" + +msgid "interface=... tag is no longer supported\n" +msgstr "interface=... non e` piu` supportato\n" + +msgid "/Xtns/Render/Stamps" +msgstr "/Xtns/Render/Francobolli" + +msgid "" +"Expected an INT32 but got '%s'. Maybe you meant '%s' instead and forgot to 'use " +"strict'" +msgstr "" +"Atteso un INT32 ma ottenuto '%s'. Forse intendevate %s e avete dimenticato 'use " +"strict'" + +msgid "/Filters/Misc/Magick" +msgstr "/Filters/Misc/Magick" + +msgid "" +"malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE" +msgstr "" +"paramdef malspecificato, atteso [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] o " +"PARAM_TYPE" + +msgid "/Filters/Distorts/Scratches" +msgstr "/Filters/Distorts/Graffiatura" + +msgid "last argument to gimp_pattern_select_widget must be scalar ref" +msgstr "" +"l'ultimo argomento di gimp_pattern_select_widget deve essere un riferinmento " +"scalare" + +msgid "accepting connections on $unix_path" +msgstr "ricezione connessioni su $unix_path" + +msgid "Load $name" +msgstr "Carico $name" + +msgid "Saving '$filename' as DATAURL..." +msgstr "" + +msgid ", %d bytes data]" +msgstr ", %d bytes per dati]" + +# msgid "Internal error: unable to convert reference in sv2net, please report!" +# msgstr "" +msgid "/Xtns/Render/Random Art #1" +msgstr "/Xtns/Render/Arte casuale #1" + +msgid "unable to create listening tcp socket: $!\n" +msgstr "non riesco a creare connessione tcp socket di ascolot: $!\n" + +msgid "/Filters/Map/Xach Shadows" +msgstr "/Filters/Map/Xach Shadows" + +msgid "" +"gimp_pixel_rgns_register supports only 1, 2 or 3 arguments, upgrade to gimp-1.1 " +"and report this error" +msgstr "" +"gimp_pixel_rgns_register supporta solo 1, 2 o 3 argomenti, aggiornare a gimp-1.1 " +"e riportare questo errore" + +msgid "Saving '$filename' as COLORHTML..." +msgstr "" + +msgid "too many" +msgstr "troppi" + +#, fuzzy +msgid "required callback 'net' not found\n" +msgstr "callback '$cb' richiesto e non trovato\n" + +msgid "/Filters/Render/Add Glow" +msgstr "/Filters/Render/Aggiungi Glow" + +msgid "Author" +msgstr "Autore" + +msgid "/Xtns/Parasite Editor" +msgstr "/Xtns/Parasite Editor" + +msgid "/Xtns/" +msgstr "/Xtns/" + +msgid "/Xtns/Render/Povray/Preferences" +msgstr "/Xtns/Render/Povray/Preferenze" + +msgid "More..." +msgstr "Altro..." + +msgid "arguments to main not yet supported!" +msgstr "argomenti a main non ancora supportati!" + +#, fuzzy +msgid "/Filters/Logulator/Newsprint text" +msgstr "/Filters/" + +msgid "unable to open Gimp::Net communications socket\n" +msgstr "impossibile aprire socket di comunicazione Gimp::Net\n" + +#, fuzzy +msgid "/Xtns/Visual Scriptor" +msgstr "/Xtns/Parasite Editor" + +#, fuzzy +msgid "/Filters/Noise/Xach Vision..." +msgstr "/Filters/Noise/Xach Vision" + +msgid "WARNING: client disconnected while holding an active lock\n" +msgstr "ATTENZIONE: sconnessione client durante un lock attivo\n" + +msgid "NAME" +msgstr "NOME" + +msgid "Help" +msgstr "Aiuto" + +#, fuzzy +msgid "/Filters/Logulator/Cool Metal" +msgstr "/Filters/" + +#, fuzzy +msgid "/Filters/Logulator/Carved" +msgstr "/Filters/" + +#, fuzzy +msgid "/Filters/Logulator/Textured" +msgstr "/Filters/" + +msgid "/Xtns/Animation/Billboard" +msgstr "/Xtns/Animation/Billboard" + +msgid "no font specified, using default" +msgstr "nessun font specificato, utilizzo valore preimpostato" + +msgid "/Select/Triangle" +msgstr "/Select/Triangolo" + +msgid "conversion to type $pf_type2string{$type} is not yet implemented\n" +msgstr "conversione a tipo $pf_type2string{$type} non e` ancora implementata\n" + +msgid "gimp_tile_get_data is not yet implemented\n" +msgstr "gimp_tile_get_data non e` ancora implementata\n" + +msgid "/Filters/Colors/Map To Gradient" +msgstr "/Filters/Colors/Mappa a Gradiente" + +#, fuzzy +msgid "/Filters/Logulator/Speed text" +msgstr "/Filters/" + +msgid "unable to grok colour specification" +msgstr "impossibile accettare specificazione di colore" + +msgid "You need at least 2 layers to perform prep4gif" +msgstr "" + +msgid "/Filters/Render/Random Blends" +msgstr "/Filters/Render/Sfumature Casuali" + +msgid "" +"Internal error: asked to deobjectify an object not in the cache, please report!" +msgstr "" +"Errore interno: incapace di gestire argomento di tipoo '%c' in net2sv, per " +"cortesia riportare" + +msgid "too many arguments" +msgstr "troppi argomenti" + +#, fuzzy +msgid "/Filters/Logulator/Gradient Bevel" +msgstr "/Filters/" msgid "gimp didn't return an execution status, fatal error" msgstr "gimp non riesce a portare a termine l'operazione, errore fatale" @@ -770,60 +854,82 @@ msgid "expected protocol version $Gimp::_PROT_VERSION, but server uses $r[0]\n" msgstr "" "attesa versione di protocollo $Gimp::_PROT_VERSION, ma il server usa $r[0]\n" -msgid "illegal parasite specification, arrayref expected" -msgstr "specifica di parasite illegale, arrayref atteso" +msgid "-*-helvetica-medium-r-normal-*-34-*-*-*-p-*-iso8859-1" +msgstr "-*-helvetica-medium-r-normal-*-34-*-*-*-p-*-iso8859-1" + +msgid "Restore values to the previous ones" +msgstr "Ripristina i valori a quelli precedenti" + +msgid " plug-in called without both image and drawable arguments!\n" +msgstr " plug-in chiamato senza argomenti dell'image e della figura!\n" + +msgid ", authorization required" +msgstr ", autorizzazione richiesta" + +msgid "unable to create listening unix socket: $!\n" +msgstr "impossibile creare socket di connessione unix: $!\n" + +msgid "invalid GIMP_HOST: 'spawn' is not a valid connection method for the server" +msgstr "" +"GIMP_HOST invalido: 'spawn' non e` un metodo di connessione valido per il server" + +msgid "Last Modified" +msgstr "Ultima modifica" + +msgid "Shortcuts" +msgstr "Scorciatoie" msgid "" -"dimension mismatch, pdl has dimension %d but at least %d dimensions required" +"the gtk perl module is required to open a dialog\n" +"window, running with default values" msgstr "" -"dimensioni sbagliate, pdl ha dimensione %d ma e` richiesta almeno una dimensione " -"pari a %d" +"il module gtk perl e` richiesto per aprire una finestra di dialogo,\n" +"proseguo l'esecuzione con i valori preimpostati" -msgid "Save" -msgstr "Salva" +msgid " plug-in called without the 3 standard arguments!\n" +msgstr " plug-in chiamato senza i 3 argomenti standard!\n" -msgid "/Xtns/Perl/Control Center" -msgstr "/Xtns/Perl/Centro di controllo" +msgid "/Filters/Distorts/MirrorSplit" +msgstr "/Filters/Distorts/Divide Specchiato" -msgid "/Filters/Logulator/Carved" -msgstr "/Filtri/Logulator/Carved" +msgid "Font Selection Dialog ($desc)" +msgstr "Finestra di Selezione Font ($desc)" -msgid "/Filters/Logulator/Textured" -msgstr "/Filtri/Logulator/Textured" - -msgid "Function Info" -msgstr "Info Funzione" - -msgid "no font specified, using default" -msgstr "nessun font specificato, utilizzo valore preimpostato" - -msgid "" -"the gtk perl module is required to run\n" -"this plug-in in interactive mode\n" +msgid "%s: procedural database execution failed on invalid input arguments" msgstr "" -"il module perl gtk e` richiesto per eseguire\n" -"questo plug-in nel modo interattivo\n" +"%s: fallimento di esecuzione database procedurale su argomenti individuali di " +"ingresso" + +msgid "/Filters/Colors/Colour To Alpha" +msgstr "/Filters/Colors/Colore ad Alfa" + +msgid "(UNINITIALIZED)" +msgstr "(NON INIZIALIZZATO)" + +msgid "closing connection %d (%d requests in %g seconds)" +msgstr "ora chiudo connessione %d (%d richiesto in %g secondi)" + +#, fuzzy +msgid "/Filters/Logulator/Frosty" +msgstr "/Filters/" + +msgid "/Filters/Render/TeX String" +msgstr "/Filters/Render/Stringa TeX" + +msgid "/Xtns/Render/Font Table" +msgstr "/Xtns/Render/Tabella Caratteri" msgid "authorization failed: $r[1]\n" msgstr "autorizzazuione negata: $r[1]\n" -msgid "use'ing Gimp::PDL is no longer necessary, please remove it!\n" -msgstr "l'uso di Gimp:PDL non e` piu` necessario, rimuovetelo pure!\n" +msgid "FATAL: Gimp::Compat version mismatch\n" +msgstr "Avviso: la versione di Gimp::Compat non corrisponde a quella attesa\n" -msgid "/Filters/Logulator/Glossy" -msgstr "/Filtri/Logulator/Glossy" +msgid "server version $Gimp::VERSION started" +msgstr "versione del server $Gimp::VERSION avviata" -msgid "Previous" -msgstr "Precedente" - -msgid "/Filters/Map/Xach Shadows" -msgstr "/Filtri/Map/Xach Shadows" - -msgid "Command" -msgstr "Comando" - -msgid "/Filters/Logulator/Chalk" -msgstr "/Filtri/Logulator/Chalk" +msgid "authorization unnecessary" +msgstr "autorizzazione non necessaria" msgid "" "$function: calling $AUTOLOAD without specifying the :auto import tag is " @@ -832,178 +938,118 @@ msgstr "" "$function: il richiamo a $AUTOLOAD senza specificare il tag di importazione " ":auto viene deprecato!\n" -# msgid "FATAL: canonicalize_colour did not return a value!" -# msgstr "" -msgid "DESCRIPTION" -msgstr "DESCRIZIONE" +msgid "Internal error: Gimp::Net #100, please report!" +msgstr "Errore Interno: Gimp::Net #100." -msgid "Accelerator" -msgstr "Acceleratore" +msgid "Close" +msgstr "Chiudi" -msgid "Cancel" -msgstr "Cancella" +msgid "/Edit/Repeat & Duplicate" +msgstr "/Edit/Ripeti e Duplica" -# notr -msgid "argument type %s expected (not %s)" -msgstr "atteso argomento di tipo %s (non %s)" +msgid "illegal parasite specification, arrayref expected" +msgstr "specifica di parasite illegale, arrayref atteso" -msgid "BG" -msgstr "Colore Sfondo" +msgid "unable to fork: $!" +msgstr "non riesco a compiere operazione fork: $!" -msgid "internal error (please report): too many main arguments" -msgstr "Errore interno (please report): troppi argomenti di main" +msgid "/Filters/Distorts/Windify" +msgstr "/Filters/Distorts/Effetto Vento" -# #ma come e` stato creato 'sto file???? -msgid "pixel size mismatch, pdl has %d channel pixels but %d channels are required" +msgid "Unsupported argumenttype $type" +msgstr "Tipo di argomento non supportato $type" + +msgid "get current foreground colour from the gimp" +msgstr "utilizza il colore in primo piano di gimp" + +msgid "/Xtns/Perl Example Plug-in" +msgstr "/Xtns/Plug-in Perl di Esempio" + +#, fuzzy +msgid "/Filters/Logulator/Neon" +msgstr "/Filters/" + +#, fuzzy +msgid "/Filters/Logulator/Chrome" +msgstr "/Filters/" + +#, fuzzy +msgid "Unable to read temporary image tile $tmp: $!" +msgstr "non riesco a leggere il file temporaneo $tmp: $!" + +msgid "/Guides/To Selection" +msgstr "/Guide/A Selezione" + +msgid "export failed" msgstr "" -"grandezza dei pixel non prevista, pdl ha %d pixel di canali ma sono richiesti %d " -"canali" -msgid "/Filters/Web/Prepare for GIF" -msgstr "/Filtri/Web/Prepara per GIF" +msgid "Help for " +msgstr "Aiuto per " + +msgid "unsupported status code: %d, fatal error\n" +msgstr "codice di status non supportato: %d, errore fatale\n" + +#, fuzzy +msgid "/Filters/Logulator/Chip Away" +msgstr "/Filters/" + +msgid "dunno how to pass arg type %d" +msgstr "impossibile passare tipo di argomento %d" + +msgid " (press Tab to complete)" +msgstr " (premere Tab per completare)" msgid "This module was built without support for PDL." msgstr "Questo modulo e` stato costruito senza supporto di PDL." -msgid "[unfinished]\n" -msgstr "[non finito]\n" - msgid "/Xtns/Homepage-Logo" msgstr "/Xtns/Logo per Homepage" -msgid "Date/Version" -msgstr "Data/Versione" +msgid "plug-in returned %d more values than expected" +msgstr "plug-in restituisce %d valori in piu` rispetto alle attese" -msgid "/Filters/Animation/Animate Cells" -msgstr "/Filtri/Animazione/Animazione Celle" +msgid "FG" +msgstr "Primo Piano" + +msgid "url size is too large ($max > 1024)\n" +msgstr "" msgid "$function: argument/return value '$p->[1]' has illegal type '$p->[0]'" msgstr "" "$function: valore di argomento o di ritorno '$p->[1]' ha un tipo illegale " "'$p->[0]'" -msgid "/View/3D Surface" -msgstr "/Visualizza/Superficie 3D" - -msgid "function '$exe' not found in this script (must be one of " -msgstr "funzione '$exe' non trovata in questo script (deve essere una de " - -msgid "required callback 'net' not found\n" -msgstr "richiesto callback non trovato\n" - -msgid "/Filters/Render/Highlight Edges" -msgstr "/Filtri/Render/Evidenzia contorni" - -msgid "accepted tcp connection from " -msgstr "accettata connessione tcp da " - -msgid "Status" -msgstr "Status" - -msgid "Load $name" -msgstr "Carico $name" - -msgid " plug-in called without the 5 standard arguments!\n" -msgstr " plug-in chiamato senza i 5 argomenti standard!\n" - -msgid "unable to accept unix connection: $!\n" -msgstr "impossibile accettare connessioni unix: $!\n" - -msgid "/Xtns/Perl Example Plug-in" -msgstr "/Xtns/Plug-in Perl di Esempio" - -msgid "/Filters/Noise/Ditherize" -msgstr "/Filtri/Disturbo/Ditherize" - -msgid "unable to accept tcp connection: $!\n" -msgstr "non riesco ad accettare connessione tcp: $!\n" - -msgid "(UNINITIALIZED)" -msgstr "(NON INIZIALIZZATO)" - -msgid "/Xtns/Parasite Editor" -msgstr "/Xtns/Gestione Parasite" - -msgid "perl-arrayref required as datatype for a gimp-array" -msgstr "perl-arrayref richiesto come tipo di dati per gimp-array" - -msgid "/Filters/Logulator/Comic Book" -msgstr "/Filtri/Logulator/Libro Comico" - -msgid "Unable to open '$filename' for writing: $!\n" -msgstr "Impossibile aprire '$filename' per la scrittura: $!\n" - -msgid "Unsupported argumenttype $type" -msgstr "Tipo di argomento non supportato $type" - -msgid "/Image/Colors/Alpha2Color" -msgstr "/Immagine/Colori/Alfa a Colore" - -msgid "/Filters/Logulator/Gradient Bevel" -msgstr "/Filtri/Logulator/Gradient Bevel" - -msgid "/Filters/Logulator/Chrome" -msgstr "/Filtri/Logulator/Cromato" - -msgid "/Filters/Misc/Magick" -msgstr "/Filtri/Varie/Magick" - -msgid "Color" -msgstr "Colore" - -msgid "authorization unnecessary" -msgstr "autorizzazione non necessaria" - -msgid "illegal parasite specification, reference expected" -msgstr "specifica di parametro aggiuntivo illegale, riferimento atteso" - -msgid "/Filters/Render/Brushed Metal" -msgstr "/Filtri/Render/Punte metallizzate" - -msgid "Saving '$filename' as DATAURL..." -msgstr "Salvataggio di '$filename' come DATAURL..." - msgid "Edit" msgstr "Modifica" -msgid "text string is empty" -msgstr "stringa di testo vuota" +#, fuzzy +msgid "/Filters/Logulator/Starscape" +msgstr "/Filters/" -msgid "$_: unknown/illegal file-save option" -msgstr "$_: opzione salvataggio-file sconosciuta/illegale" +msgid "/Filters/Enhance/2x2 Contrast Enhance" +msgstr "/Filters/Enhance/2x2 Rafforza Contrasto" -msgid " = [argument error]\n" -msgstr " = [argomento errato]\n" +msgid "" +"$function: argument name '$p->[1]' contains illegal characters, only 0-9, a-z " +"and _ allowed" +msgstr "" +"$function: nome di argumento '$p->[1]' contiene caratteri illegal, solo 0-9, a-z " +"and _ allowed" -msgid "/Xtns/" -msgstr "/Xtns/" - -msgid "plug-in returned %d more values than expected" -msgstr "plug-in restituisce %d valori in piu` rispetto alle attese" - -msgid "$_ is not a valid import tag for package $pkg" -msgstr "$_ non e` un tag valido per importare il pacchetto $pkg" - -msgid "url size is too large ($max > 1024)\n" -msgstr "la dimensione dell'url è troppo grande ($max > 1024)\n" +# msgid "Unable to grok '%s' as colour specifier" +# msgstr "" +# grok +msgid "OK" +msgstr "OK" msgid "illegal command received, aborting connection" msgstr "ricevuto comando illegale, chiudo connessione" -msgid "Pattern Selection Dialog" -msgstr "Schermata selezione Motivo di riempimento" +msgid "/Layers/Layer to Image Size" +msgstr "/Layers/Porta a Grandezza Immagine" -msgid "get current foreground colour from the gimp" -msgstr "utilizza il colore in primo piano di gimp" +msgid "(none)" +msgstr "(niente)" -msgid "PDB Explorer - the olof edition (yet still an alpha version)" -msgstr "PDB Explorer - edizione olof (versione alpha)" - -msgid "not enough" -msgstr "non abbastanza" - -msgid "/Filters/Web/Perl-o-tine..." -msgstr "/Guide/Perl-o-tine" - -msgid "accepting connections on $unix_path" -msgstr "ricezione connessioni su $unix_path" +#~ msgid "/Script-Fu/Decor/Stampify" +#~ msgstr "/Script-Fu/Decor/Stampify" diff --git a/plug-ins/perl/scm2perl b/plug-ins/perl/scm2perl index 66f219453c..ed80bfc601 100755 --- a/plug-ins/perl/scm2perl +++ b/plug-ins/perl/scm2perl @@ -98,10 +98,8 @@ $parser = new Parse::RecDescent <<'EOA'; RGB RGB_IMAGE RGBA RGBA_IMAGE - - ADD SELECTION_ADD - SUB SELECTION_SUB - REPLACE SELECTION_REPLACE + + LINEAR LINEAR_INTERPOLATION NORMAL NORMAL_MODE ADDITION ADDITION_MODE