mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 03:52:33 +00:00
see plug-ins/perl/Changes
This commit is contained in:
parent
dc3d7403be
commit
4bdca14289
|
@ -322,8 +322,7 @@ sub gimp_image_add_new_layer {
|
|||
|
||||
sub gimp_image_set_visible {
|
||||
my $image = shift;
|
||||
my %layers;
|
||||
@layers{map $$_,@_}=(1) x @_;
|
||||
my %layers; @layers{map $$_,@_}=(1) x @_;
|
||||
for ($image->get_layers) {
|
||||
$_->set_visible ($layers{$$_});
|
||||
}
|
||||
|
@ -331,8 +330,7 @@ sub gimp_image_set_visible {
|
|||
|
||||
sub gimp_image_set_invisible {
|
||||
my $image = shift;
|
||||
my %layers;
|
||||
@layers{map $$_,@_}=(1) x @_;
|
||||
my %layers; @layers{map $$_,@_}=(1) x @_;
|
||||
for ($image->get_layers) {
|
||||
$_->set_visible (!$layers{$$_});
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/perl -w
|
||||
#!/usr/bin/perl
|
||||
|
||||
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
|
||||
if 0; # not running under some shell
|
||||
|
||||
# This one's all mine. Well, its GPL/Artisitic but I"m the author and creator. # I think you need gimp 1.1 or better for this - if you don't, please let
|
||||
# me know
|
||||
# This one's all mine. Well, its GPL/Artisitic but I"m the author and
|
||||
# creator. I think you need gimp 1.1 or better for this - if you don't,
|
||||
# please let me know
|
||||
|
||||
# I'm hacking this on top of my sethspin script, so this is doing even more
|
||||
# stuff it wasn't really designed to do. Hence if you thought sethspin was
|
||||
|
|
|
@ -16,11 +16,12 @@ sub pixelmap { # es folgt das eigentliche Skript...
|
|||
my $init="";
|
||||
|
||||
$_expr =~ /\$p/ and $init.='$p = $src->data;';
|
||||
$_expr =~ /\$P/ and $init.= $drawable->has_alpha ? '$P = $src->data;' : '$P = $src->data->slice("0:-1");';
|
||||
$_expr =~ /\$x/ and $init.='$x = sequence(long,$w); $x+=$_dst->x;';
|
||||
$_expr =~ /\$y/ and $init.='$y = sequence(long,$h); $y+=$_dst->y;';
|
||||
$_expr =~ /\$bpp/ and $init.='$bpp = $_dst->bpp;';
|
||||
|
||||
my($p,$x,$y,$bpp,$w,$h);
|
||||
my($p,$P,$x,$y,$bpp,$w,$h);
|
||||
|
||||
$_expr = "sub{$init\n#line 1\n$_expr\n;}";
|
||||
|
||||
|
@ -55,7 +56,7 @@ register "pixelmap",
|
|||
"=pod(DESCRIPTION)",
|
||||
"Marc Lehmann",
|
||||
"Marc Lehmann <pcg\@goof.com>",
|
||||
"19990729",
|
||||
"19991115",
|
||||
__"<Image>/Filters/Map/Pixelmap",
|
||||
"*",
|
||||
[
|
||||
|
@ -68,7 +69,7 @@ register "pixelgen",
|
|||
"=pod(DESCRIPTION)",
|
||||
"Marc Lehmann",
|
||||
"Marc Lehmann <pcg\@goof.com>",
|
||||
"19990730",
|
||||
"19991115",
|
||||
__"<Toolbox>/Xtns/Render/Pixelgenerator",
|
||||
"*",
|
||||
[
|
||||
|
@ -100,6 +101,34 @@ exit main;
|
|||
|
||||
Not yet written yet, sorry...
|
||||
|
||||
=over 4
|
||||
|
||||
=item $p
|
||||
|
||||
The source pixels (1..4 bytes per pixel, depending on format). Use like this:
|
||||
|
||||
$p*3.5 # the return value is the result
|
||||
|
||||
=item $P
|
||||
|
||||
The source pixels without alpha. Use it like this:
|
||||
|
||||
$P *= 0.5; $p # modify $P inplace, return also modified $p as result
|
||||
|
||||
=item $x
|
||||
|
||||
A one-dimensional vector of x-coordinates currently being worked on.
|
||||
|
||||
=item $y
|
||||
|
||||
A one-dimensional vector of y-coordinates currently being worked on.
|
||||
|
||||
=item $bpp
|
||||
|
||||
The bytes per pixel value of the destination area.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/perl -w
|
||||
#!/usr/bin/perl
|
||||
|
||||
# This one's all mine. Well, its GPL/Artisitic but I"m the author and creator. # I think you need gimp 1.1 or better for this - if you don't, please let
|
||||
# me know
|
||||
|
@ -17,7 +17,7 @@
|
|||
# Seth Burgess
|
||||
# <sjburges@gimp.org>
|
||||
|
||||
use Gimp;
|
||||
use Gimp qw/:auto/;
|
||||
use Gimp::Fu;
|
||||
use Gimp::Util;
|
||||
|
||||
|
@ -58,7 +58,7 @@ sub spin_layer { # the function for actually spinning the layer
|
|||
$x[3]-saw($i)*$prp*$framelay->width,$x[2]+$spin->height *sin($i)/2,
|
||||
$x[1]-saw($i)*$prp*$framelay->width,$x[4]-$spin->height *sin($i)/2,
|
||||
$x[3]+saw($i)*$prp*$framelay->width,$x[4]-$spin->height *sin($i)/2);
|
||||
$floater->floating_sel_to_layer;
|
||||
#$floater->floating_sel_to_layer;
|
||||
# fill entire layer with background
|
||||
$framelay->fill(1); # BG-IMAGE-FILL
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue