see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann 2000-01-23 23:22:41 +00:00
parent 1485e40383
commit 46c42d6721
20 changed files with 68 additions and 51 deletions

View file

@ -3,6 +3,8 @@ Revision history for Gimp-Perl extension.
1.20
- image types updated to reflect gimp's reality.
- updated perlotine.
- fixed logulator (bugs are actually in the script-fu parts).
- moved gimp_drawable_bounds from Gimp::Util to Gimp.
1.19 Thu Jan 6 00:21:58 CET 2000
- used N_ to mark all the menu paths, since gimp now tries to

View file

@ -982,6 +982,12 @@ channels. The reason why this is documented is that the usual way to return
C<PARAM_INT32ARRAY>'s would be to return a B<reference> to an B<array of
integers>, rather than blessed objects.
=item gimp_drawable_bounds drawable/gdrawable
Returns an array (0,0,w,h) containing the upper left corner and the
size of currently selected parts of the drawable, just as needed by
PixelRgn->new and similar functions.
=item server_eval(string)
This evaluates the given string in array context and returns the

View file

@ -80,6 +80,11 @@ sub gimp_progress_init {
}
}
sub gimp_drawable_bounds {
my @b = (shift->mask_bounds)[1..4];
(@b[0,1],$b[2]-$b[0],$b[3]-$b[1]);
}
1;
__END__

View file

@ -277,26 +277,33 @@ static int gpixelrgn_free (SV *obj, MAGIC *mg)
static MGVTBL vtbl_gpixelrgn = {0, 0, 0, 0, gpixelrgn_free};
/* coerce whatever was given into a gdrawable-sv */
static SV *force_gdrawable (SV *drawable)
{
if (!(sv_derived_from (drawable, PKG_GDRAWABLE)))
{
if (sv_derived_from (drawable, PKG_DRAWABLE)
|| sv_derived_from (drawable, PKG_LAYER)
|| sv_derived_from (drawable, PKG_CHANNEL))
drawable = sv_2mortal (new_gdrawable (SvIV (SvRV (drawable))));
else
croak (__("argument is not of type %s"), PKG_GDRAWABLE);
}
return drawable;
}
static SV *new_gpixelrgn (SV *gdrawable, int x, int y, int width, int height, int dirty, int shadow)
{
static HV *stash;
SV *sv = newSVn (sizeof (GPixelRgn));
GPixelRgn *pr = (GPixelRgn *)SvPV_nolen(sv);
if (!(sv_derived_from (gdrawable, PKG_GDRAWABLE)))
{
if (sv_derived_from (gdrawable, PKG_DRAWABLE)
|| sv_derived_from (gdrawable, PKG_LAYER)
|| sv_derived_from (gdrawable, PKG_CHANNEL))
gdrawable = sv_2mortal (new_gdrawable (SvIV (SvRV (gdrawable))));
else
croak (__("argument is not of type %s"), PKG_GDRAWABLE);
}
if (!stash)
stash = gv_stashpv (PKG_PIXELRGN, 1);
gimp_pixel_rgn_init (pr, old_gdrawable (gdrawable), x, y, width, height, dirty, shadow);
gimp_pixel_rgn_init (pr, old_gdrawable (gdrawable),
x, y, width, height, dirty, shadow);
sv_magic (sv, SvRV(gdrawable), '~', 0, 0);
mg_find (sv, '~')->mg_virtual = &vtbl_gpixelrgn;
@ -1760,7 +1767,7 @@ gimp_pixel_rgn_init(gdrawable, x, y, width, height, dirty, shadow)
int dirty
int shadow
CODE:
RETVAL = new_gpixelrgn (gdrawable,x,y,width,height,dirty,shadow);
RETVAL = new_gpixelrgn (force_gdrawable (gdrawable),x,y,width,height,dirty,shadow);
OUTPUT:
RETVAL
@ -2140,7 +2147,7 @@ gimp_pixel_rgn_data(pr,newdata=0)
PDL_Long dims[3];
dims[0] = pr->bpp;
dims[1] = pr->w;/*D*/
dims[1] = pr->rowstride / pr->bpp;
dims[2] = pr->h;
PDL->setdims (p, dims, 3);

View file

@ -250,19 +250,6 @@ sub gimp_text_wh {
=pod
=item C<gimp_drawable_bounds $drawable>
returns an array (x,y,w,h) containing the upper left corner and the size of the
current mask, just as needed by pixelrgn and similar functions.
=cut
sub gimp_drawable_bounds {
my @b = (shift->mask_bounds)[1..4];
(@b[0,1],$b[2]-$b[0],$b[3]-$b[1]);
}
=pod
=item C<gimp_image_layertype $alpha>
returns the corresponding layer type for an image, alpha controls wether the layer type

View file

@ -28,7 +28,7 @@ if ($ARGV[0] ne "--writemakefile") {
@pins =
qw(windify prep4gif webify PDB tex-to-float ditherize
feedback xachlego xachshadow parasite-editor
feedback xachlego xachshadow parasite-editor roundsel
scratches blowinout terral_text xachvision perlcc
animate_cells image_tile yinyang stamps font_table
perlotine randomblends innerbevel fit-text guidegrid roundrectsel

View file

@ -17,6 +17,8 @@ use vars qw($use_unix $use_tcp $trace_res $server_quit $max_pkt $unix $tcp $ps_f
use Gimp qw(__ N_);
use Gimp::Net ();
N_"/Xtns/Perl"; # workaround for i18n weirdnesses
Gimp::set_trace(\$trace_res);
Gimp::ignore_functions(qw(gimp_progress_init gimp_progress_update));

View file

@ -20,11 +20,11 @@ API generalization
firetext! AND _grayscale_ for map_gradient(!)
sota-chrome pagesize of 2 is _wrong_
bugs
* never grayed out = "undef" imagetypes!!!
* 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).
[DONE] * never grayed out = "undef" imagetypes!!!
[DONE] * gimp_layer_set_name(4, "(null)") = gimp: fatal error: sigsegv caught
[KILL] * ftp://metalab.unc.edu/pub/Linux/X11/gtkbuffet/libs/gtkxmhtml/ into INSTALL
* gtview_log (perlcc & helpfenster) erste zeile anzeigen + scrollbar
[DONE] * make test should not be run without DISPLAY
@ -32,17 +32,15 @@ bugs
* fix Gimp::Feature::missing => on_query-dir!
[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?
[????] * bricks requires disable for pattern(?)
[KILL] * better default argument-handlign via a "massage_args" callback from Gimp/UI/interact?
* installation & Feature system (?)
* map_to_gradient does not work on GRAYA thingies. Argh.
* scroll behaviour, use clist instead of list?
[KILL] * scroll behaviour, use clist instead of list?
* document Gimp::PDL and rect2, ...2 functions!
* Kommandozeilenmodus(!). (???)
[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] * get rid of xs_exit. please please fuck me plenty.
* create gimpstyle.pod
important issues
@ -51,24 +49,25 @@ important issues
* constant names (RADIO) automatically into help strings!
* migrate BOOT: into INIT() (forgot why but important for B)
* gimp_progress_done, gimp_progress_close
* maybe implement --enable-perl=runtime-only?
[KILL] * maybe implement --enable-perl=runtime-only?
* gimp_default_display (...) for libgimp
* Gimp::Module for modules (!)
* gimp for dummies (you don't understand this, harharhar!)
* PerlCC configurable options for Perl-Server startup, Gipm_host etc.
* implement CALLBACKS via the Perl-Server
* PF_COORDS (just as Light Effects/FlareFX)
* PF_PREVIEW(!)
* change set_usize to something else..
[KILL] * change set_usize to something else..
* Gimp::IO (?)
* install scripts in share/
* gimp->object_id, drawable_object_id remove!
[KILL] * gimp->object_id, drawable_object_id remove!
* vamp up homepage
* Gimp::ping
* allow plug-ins to register with only a drawable argument(!)
* gradient button
* weighted movement in drawing tools
* --function localfunc to select one of the registered scripts
* create working progress when Net and $verbose
[KILL] * weighted movement in drawing tools
[KILL] * --function localfunc to select one of the registered scripts
[KILL] * create working progress when Net and $verbose
* default parameters at end(!)
* try to deduce default parameters

View file

@ -488,6 +488,7 @@ sub _new_adjustment {
$adj[3]||=($adj[1]-$adj[0])*0.01;
$adj[4]||=0;
print "new adjustment $_[0], @adj\n";
new Gtk::Adjustment $_[0],@adj;
}

View file

@ -3,7 +3,6 @@
use Gimp::Feature 'pdl';
use Gimp 1.091;
use Gimp::Fu;
use Gimp::Util;
use PDL::LiteF;
register "colour_to_alpha",

View file

@ -3,6 +3,8 @@
use Gimp;
use Gimp::Fu;
N_"/Xtns/Render"; N_"/Xtns/Render/Logos"; # i18n workaround
sub fire {
my ($image, $drawable, $threshold, $strength, $gradient, $displace) = @_;

View file

@ -12,10 +12,12 @@
require 5.004;
use Gimp qw(:auto __ N_);
use Gimp qw(:auto N_);
use Gimp::Fu;
use Gimp::Util;
N_"/Xtns/Render"; N_"/Xtns/Render/Logos"; # i18n workaround
use strict;
use vars qw($glowing_steel_version $glowing_steel_released
$gimp_white_fudge);

View file

@ -8,7 +8,6 @@
use Gimp::Feature 'pdl';
use Gimp 1.098;
use Gimp::Fu;
use Gimp::Util;
use PDL::LiteF;
sub iterate {

View file

@ -11,6 +11,8 @@ use Gimp qw(:auto __ N_);
use Gimp::Fu;
use Gimp::Util;
N_"/Xtns/Render"; N_"/Xtns/Render/Logos"; # i18n workaround
$defaultcolor1 = [124,10,18];
$defaultcolor2 = [200,19,27];

View file

@ -4,6 +4,8 @@ use Gimp qw(:auto __ N_);
use Gimp::Fu;
use Gimp::Util;
N_"/Filters/Logulator"; # workaround for i18n weirdnesses
#Gimp::set_trace(TRACE_CALL);
my $global_drawable;
@ -2229,7 +2231,7 @@ register "perl_fu_sota_chrome_logo",
[
[PF_ADJUSTMENT,'chrome_saturation',"Chrome Saturation", [-80, -100, 100, 1, 10, 0, 0]],
[PF_ADJUSTMENT,'chrome_lightness', "Chrome Lightness", [-47, -100, 100, 1, 10, 0, 0]],
[PF_ADJUSTMENT,'chrome_factor', "Chrome Factor", [.75, 0, 1, .1, .01, 2, 0]],
[PF_ADJUSTMENT,'chrome_factor', "Chrome Factor", [.75, 0, 1, .1, .01, 0, 0]],
[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", "-*-RoostHeavy-*-r-*-*-24-*-*-*-p-*-*-*"],
@ -2750,7 +2752,7 @@ sub script_fu_title_header {
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_palette_set_background (gimp_color_picker ($text_layer, $text_layers_offset, 0, 1, 0, 2, 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 ());

View file

@ -3,7 +3,6 @@
use Gimp::Feature 'pdl';
use Gimp 1.1;
use Gimp::Fu;
use Gimp::Util;
use PDL::LiteF;
# convert to greyscale. could be improved, but should still be fast!

View file

@ -3,7 +3,6 @@
use Gimp::Feature 'pdl';
use Gimp 1.099;
use Gimp::Fu;
use Gimp::Util;
use PDL;
use constant PI => 4 * atan2 1,1;

View file

@ -5,6 +5,8 @@ use Gimp::Feature qw(gimp-1.1 persistency);
use Gimp::Fu;
use Gimp::Data;
N_"/Xtns/Render"; N_"/Xtns/Render/Logos"; N_"/Xtns/Render/Povray"; # i18n workaround
use constant DEG2RAD => 4 / 180 * atan2 1,1;
sub set_preferences {

View file

@ -3,6 +3,8 @@
use Gimp qw(:auto __ N_);
use Gimp::Fu;
N_"/Xtns/Render"; # dummy translation for i18n bugs
sub stamps {
my ($size, $hole, $paper, $diameter, $gap) = @_;

View file

@ -179,10 +179,10 @@ nth => 'sub nth {
}
}
script : (...!/$/ stmt)(s) nl /$/
script : ( ...!/$/ stmt)(s) nl /$/
| <error:unable to recognize next statement>
stmts : (...!')' nl stmt)(s?)
stmts : ( ...!')' nl stmt)(s?)
stmt : '(' command ')'
| expr gen[";"]