Commit b1c8deb4 authored by Marc Lehmann's avatar Marc Lehmann
Browse files

see plug-ins/perl/Changes

parent e8914730
......@@ -40,6 +40,7 @@ Revision history for Gimp-Perl extension.
- updated logulator from scheme sources. oh yeah :(
- Net.xs didn't compile without PDL.
- applied (but did not test) UI patch by Sven.
- fixed stupid non-ansi errors in Gimp/Lib.xs.
1.17 Wed Nov 24 21:25:19 CET 1999
- re-fitted i18n translation for most plug-ins.
......
......@@ -995,9 +995,13 @@ convert_sv2gimp (char *croak_str, GParam *arg, SV *sv)
AV *av = (AV *)SvRV(sv);
if (av_len(av) == 2)
{
STRLEN size;
arg->data.d_parasite.name = SvPv(*av_fetch(av, 0, 0));
arg->data.d_parasite.flags = SvIV(*av_fetch(av, 1, 0));
arg->data.d_parasite.data = SvPV(*av_fetch(av, 2, 0), arg->data.d_parasite.size);
arg->data.d_parasite.data = SvPV(*av_fetch(av, 2, 0), size);
arg->data.d_parasite.size = size;
}
else
sprintf (croak_str, __("illegal parasite specification, expected three array members"));
......@@ -1962,7 +1966,7 @@ gimp_pixel_rgn_get_row2(pr, x, y, width)
int width
CODE:
RETVAL = newSVn (width * pr->bpp);
gimp_pixel_rgn_get_row (pr, SvPV_nolen(RETVAL), x, y, width);
gimp_pixel_rgn_get_row (pr, (guchar *)SvPV_nolen(RETVAL), x, y, width);
OUTPUT:
RETVAL
......@@ -1975,7 +1979,7 @@ gimp_pixel_rgn_get_rect2(pr, x, y, width, height)
int height
CODE:
RETVAL = newSVn (width * height * pr->bpp);
gimp_pixel_rgn_get_rect (pr, SvPV_nolen(RETVAL), x, y, width, height);
gimp_pixel_rgn_get_rect (pr, (guchar *)SvPV_nolen(RETVAL), x, y, width, height);
OUTPUT:
RETVAL
......@@ -1988,7 +1992,7 @@ gimp_pixel_rgn_set_rect2(pr, data, x, y, w=pr->w)
int w
CODE:
{
STRLEN dlen; char *dta = SvPV (data, dlen);
STRLEN dlen; guchar *dta = (guchar *)SvPV (data, dlen);
gimp_pixel_rgn_set_rect (pr, dta, x, y, w, dlen / (w*pr->bpp));
}
......@@ -2113,8 +2117,8 @@ gimp_pixel_rgn_data(pr,newdata=0)
CODE:
if (newdata)
{
char *src;
char *dst;
guchar *src;
guchar *dst;
int y, stride;
old_pdl (&newdata, 2, pr->bpp);
......@@ -2223,11 +2227,11 @@ gimp_patterns_get_pattern_data(name)
{
EXTEND (SP, 5);
PUSHs (sv_2mortal (newSVpv (return_vals[1].data.d_string, 0)));
PUSHs (sv_2mortal (newSViv (return_vals[2].data.d_int32)));
PUSHs (sv_2mortal (newSViv (return_vals[3].data.d_int32)));
PUSHs (sv_2mortal (newSViv (return_vals[4].data.d_int32)));
PUSHs (sv_2mortal (newSVpvn(return_vals[6].data.d_int8array, return_vals[5].data.d_int32)));
PUSHs (sv_2mortal (newSVpv ( return_vals[1].data.d_string, 0)));
PUSHs (sv_2mortal (newSViv ( return_vals[2].data.d_int32)));
PUSHs (sv_2mortal (newSViv ( return_vals[3].data.d_int32)));
PUSHs (sv_2mortal (newSViv ( return_vals[4].data.d_int32)));
PUSHs (sv_2mortal (newSVpvn((char *)return_vals[6].data.d_int8array, return_vals[5].data.d_int32)));
}
gimp_destroy_params (return_vals, nreturn_vals);
......
......@@ -3,7 +3,7 @@
# Blow In/Out
# John Pitney
use Gimp 1.06;
use Gimp qw(:auto __ N_);
use Gimp::Fu;
# print "hello there\n";
......@@ -44,11 +44,11 @@ sub blowinout {
$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);
plug_in_noisify($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,
plug_in_displace($img, $drawable, $xdist, $ydist, 1, 1, $dmlayer,
$dmlayer, 1);
if ( $inmode == 1 )
{
......@@ -62,11 +62,11 @@ sub blowinout {
$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);
plug_in_noisify($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,
plug_in_displace($img, $drawable, $xdist, $ydist, 1, 1, $dmlayer,
$dmlayer, 1);
if ( $inmode == 1 )
{
......
......@@ -37,7 +37,7 @@ register "plug_in_ditherize",
sub {
my($image,$drawable,$dither,$colours)=@_;
Gimp::set_trace(-1);
# Gimp::set_trace(-1);
$drawable->is_layer or die "this plug-in only works for layers";
......
......@@ -13,7 +13,7 @@ register "layer_apply",
"*",
[
[PF_TEXT, "expr", "the perl expression to run for each layer",
'$d->gauss_rle($P*100,1,1)'],
'$d->gauss_rle($P*100+1,1,1)'],
[PF_DRAWABLE, "drawable2", "an optional extra drawable for use by the code"],
],
[],
......
......@@ -76,7 +76,9 @@ register "guide_grid",
##
#$img->selection_all();
#$img->selection_none();
$layer->update(0, 0, $img->height, $img->width);
return();
};
exit main;
......@@ -7,7 +7,7 @@
# working btw). You can follow step by step with the website at
# http://tigert.gimp.org/gimp/tutorials/beveled_text/
use Gimp;
use Gimp qw(:auto __ N_);
use Gimp::Fu;
use Gimp::Util;
......
......@@ -53,7 +53,7 @@ EOF
my($image,$drawable)=(shift,shift);
$drawable->has_alpha or die "It makes no sense to call $menupath with a drawable lacking alpha!\n";
$i=0;
while($i<@_) {
while($i<=@_) {
if($i==$ti) {
splice @_,$i,0,"-- Text --";
} elsif ($i==$fsi) {
......
......@@ -240,7 +240,7 @@ sub create_main {
$attach_func = sub { shift->parasite_attach (shift) };
$detach_func = sub { shift->parasite_detach (shift) };
&$set_submenu(map [$_,$_->image->get_filename." / "
.($_->layer ? $_->layer_get_name : $_->channel_get_name)],
.($_->is_layer ? $_->layer_get_name : $_->channel_get_name)],
map (($_->get_layers,$_->get_channels),Gimp->image_list));
});
$menu->append($item);
......
......@@ -3,7 +3,7 @@
# This is adrian's idea - take random blends and difference them. You're
# bound to come up w/ something cool eventually.
use Gimp;
use Gimp qw(:auto __ N_);
use Gimp::Fu;
use Gimp::Util;
......
......@@ -26,7 +26,7 @@
#[terral] input levels of 0, .24, 113 [22:11]
#[terral] --end of script [22:12]
use Gimp 1.06;
use Gimp qw(:auto __ N_);
use Gimp::Fu;
use Gimp::Util;
......
......@@ -3,7 +3,7 @@
# sent to me by Seth Burgess <sjburges@gimp.org>
# small changes my Marc Lehmann <pcg@goof.com>
use Gimp;
use Gimp qw(:auto __ N_);
use Gimp::Fu;
#Gimp::set_trace(TRACE_CALL);
......@@ -21,11 +21,11 @@ sub windify {
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,
plug_in_noisify($out,$windlayercopy,0,$density/255,
$density/255,
$density/255,1);
plug_in_mblur(1,$out,$windlayercopy,0,15,$angle);
plug_in_mblur($out,$windlayercopy,0,15,$angle);
gimp_layer_set_mode($windlayercopy, 10); # Lighten Only
gimp_image_merge_visible_layers($out,0);
......@@ -33,7 +33,7 @@ sub windify {
# 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),
plug_in_displace($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);
......
......@@ -41,7 +41,8 @@ register "xachvision",
$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_grid(1,$img->height * 3,0,[0,0,0],255, 1,3,0,[0,0,0],255,
0,0,0,[0,0,0],255 );
$midmask->plug_in_gauss_iir(1.01, 1, 1);
gimp_palette_set_background($oldbackground);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment