[gimp-perl] More tidying for distrib.
- From: Ed J <edj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-perl] More tidying for distrib.
- Date: Wed, 23 Apr 2014 15:28:34 +0000 (UTC)
commit 71737d427c07752d659a54bf38167b9edc890360
Author: Ed J <edj src gnome org>
Date: Wed Apr 23 16:27:30 2014 +0100
More tidying for distrib.
Gimp.pm | 13 ++++++++++---
Makefile.PL | 28 ++++++++++++++++++++--------
examples/example-fu | 9 +++++----
gimp-perl.doap | 6 ++----
4 files changed, 37 insertions(+), 19 deletions(-)
---
diff --git a/Gimp.pm b/Gimp.pm
index 9b00daf..691436b 100644
--- a/Gimp.pm
+++ b/Gimp.pm
@@ -427,18 +427,25 @@ Gimp - write GIMP extensions/plug-ins/load- and save-handlers in Perl
podregister {
# your code
- return Gimp::Image->new(100, 100, RGB);
+ my $image = new Gimp::Image (600, 300, RGB);
+ my $bg = $image->layer_new(
+ 600,300,RGB_IMAGE,"Background",100,NORMAL_MODE
+ );
+ $image->insert_layer($bg, 1, 0);
+ $image->edit_fill($bg, FOREGROUND_FILL);
+ Gimp::Display->new($image);
+ $image;
};
exit main;
__END__
=head1 NAME
- function_name - Short description of the function
+ example_function - Short description of the function
=head1 SYNOPSIS
- <Image>/Filters/Menu/Location...
+ <Image>/File/Create/Patterns/Example...
=head1 DESCRIPTION
diff --git a/Makefile.PL b/Makefile.PL
index 498f48c..44d5464 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -36,23 +36,35 @@ $pkg->add_pm(map { ($_ => "\$(INST_LIB)/$_") } qw(Gimp.pm));
$pkg->save_config('Gimp/IFiles.pm');
WriteMakefile(
- 'dist' => {
+ dist => {
PREOP => 'make setver && chmod -R u=rwX,go=rX . ;',
COMPRESS => 'gzip -9v',
SUFFIX => '.gz',
},
- 'PREREQ_PM' => {
+ MIN_PERL_VERSION => '5.014001',
+ PREREQ_PM => {
Gtk2 => 1.0,
PDL => 2.0,
Data::Dumper => 2.0,
IO::All => 0,
ExtUtils::Depends => 0,
+ ExtUtils::PkgConfig => 0,
},
- 'DIR' => [ qw/Gimp Net UI examples/ ],
- 'NAME' => 'Gimp',
- 'VERSION_FROM' => 'Gimp.pm',
- 'EXE_FILES' => [ map { "utils/$_" } qw(gimpdoc xcftopnm embedxpm scm2perl) ],
- 'realclean' => { FILES => "Makefile" },
- 'clean' => { FILES => "Makefile.old stamp-h Gimp/Config.pm Gimp/IFiles.pm" },
+ META_MERGE => {
+ "meta-spec" => { version => 2 },
+ resources => {
+ repository => {
+ type => 'git',
+ url => 'git://git.gnome.org/gimp-perl',
+ web => 'https://git.gnome.org/browse/gimp-perl/',
+ },
+ },
+ },
+ DIR => [ qw/Gimp Net UI examples/ ],
+ NAME => 'Gimp',
+ VERSION_FROM => 'Gimp.pm',
+ EXE_FILES => [ map { "utils/$_" } qw(gimpdoc xcftopnm embedxpm scm2perl) ],
+ realclean => { FILES => "Makefile" },
+ clean => { FILES => "Makefile.old stamp-h Gimp/Config.pm Gimp/IFiles.pm" },
$pkg->get_makefile_vars,
);
diff --git a/examples/example-fu b/examples/example-fu
index 5cf3443..d157bab 100755
--- a/examples/example-fu
+++ b/examples/example-fu
@@ -5,7 +5,7 @@ use Gimp;
use Gimp::Fu;
podregister {
-
my($width,$height,$text,$longtext,$brd1,$brd2,$font,$fg,$bg,$ignore,$xtraimg,$xtradrw,$effecttype,$brush,$pattern,$gradient)=
_;
+ # no input parameters line - source filter inserts. See Gimp::Fu docs.
Gimp::set_trace(TRACE_CALL); # remove this to stop debugging output
Gimp::Context->push; # store current settings, so present ones preserved
my $img = Gimp::Image->new($width, $height, RGB);
@@ -14,8 +14,8 @@ podregister {
my $l = Gimp::Layer->new($img, $width, $height, RGB, __"Background", 100, NORMAL_MODE);
$l->insert_layer(0, 0); # required!
# now a few syntax examples
- Gimp::Context->set_foreground($fg) unless $ignore;
- Gimp::Context->set_background($bg) unless $ignore;
+ Gimp::Context->set_foreground($text_colour) unless $ignore_cols;
+ Gimp::Context->set_background($bg_colour) unless $ignore_cols;
fill $l BACKGROUND_FILL;
my $text_layer = $img->text_fontname(-1, 10, 10, $text, 5, 1, 10, PIXELS, $font);
Gimp::Context->set_foreground("green");
@@ -40,7 +40,7 @@ example_script - Gimp::Fu example, mostly non-functional
=head1 DESCRIPTION
Just a starting point to derive new scripts. Always remember to put a
-long help message here!
+descriptive help message here!
=head1 PARAMETERS
@@ -74,4 +74,5 @@ Marc Lehmann <pcg goof com>
=head1 LICENSE
(c) 1998,1999,2000 Marc Lehmann
+
Distributed under the same terms as Gimp-Perl.
diff --git a/gimp-perl.doap b/gimp-perl.doap
index 164b127..0b93c54 100644
--- a/gimp-perl.doap
+++ b/gimp-perl.doap
@@ -3,17 +3,15 @@
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
-
<name xml:lang="en">GIMP Perl</name>
- <shortdesc xml:lang="en">A plug-in for GIMP allowing automation by the use of Perl scripts</shortdesc>
- <homepage rdf:resource="http://www.ve3syb.ca/software/gimp-perl/" />
+ <shortdesc xml:lang="en">GIMP plug-in allowing Perl automation</shortdesc>
+ <homepage rdf:resource="https://git.gnome.org/browse/gimp-perl/" />
<download-page rdf:resource="http://search.cpan.org/dist/Gimp/" />
<!--
<mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/desktop-devel-list" />
-->
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=gimp-perl" />
<category rdf:resource="http://api.gnome.org/doap-extensions#bindings" />
-
<maintainer>
<foaf:Person>
<foaf:name>Ed J</foaf:name>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]