*** empty log message ***

This commit is contained in:
Marc Lehmann 2001-05-13 19:53:40 +00:00
parent 574cc7ac98
commit 0a4ec8fb8c
5 changed files with 35 additions and 5 deletions

View File

@ -1,5 +1,7 @@
Revision history for Gimp-Perl extension.
- added examples/circular_text by Mike Gherlone.
1.21 Fri Mar 9 18:33:04 CET 2001
- better Gimp::Fu argument parsing.
- initializing the rgb database now works after a fork.

View File

@ -488,10 +488,17 @@ dump_params (int nparams, GimpParam *args, GimpParamDef *params)
case GIMP_PDB_STRINGARRAY: dump_printarray (args, i, char* , d_stringarray, "'%s'"); break;
case GIMP_PDB_COLOR:
#if GIMP_CHECK_VERSION(1,3,0)
trace_printf ("[%d,%d,%d]",
args[i].data.d_color.r,
args[i].data.d_color.g,
args[i].data.d_color.b);
#else
trace_printf ("[%d,%d,%d]",
args[i].data.d_color.red,
args[i].data.d_color.green,
args[i].data.d_color.blue);
#endif
break;
#if GIMP_PARASITE
@ -701,7 +708,15 @@ unbless_croak (SV *sv, char *type)
}
static void
canonicalize_colour (char *err, SV *sv, GimpRGB *c)
canonicalize_colour (
char *err,
SV *sv,
#if GIMP_CHECK_VERSION(1,3,0)
GimpRGB *c
#else
GimpParamColor *c
#endif
)
{
dSP;
@ -725,9 +740,15 @@ canonicalize_colour (char *err, SV *sv, GimpRGB *c)
AV *av = (AV *)SvRV(sv);
if (av_len(av) == 2)
{
#if GIMP_CHECK_VERSION(1,3,0)
c->r = SvIV(*av_fetch(av, 0, 0));
c->g = SvIV(*av_fetch(av, 1, 0));
c->b = SvIV(*av_fetch(av, 2, 0));
#else
c->red = SvIV(*av_fetch(av, 0, 0));
c->green = SvIV(*av_fetch(av, 1, 0));
c->blue = SvIV(*av_fetch(av, 2, 0));
#endif
}
else
sprintf (err, __("a color must have three components (array elements)"));
@ -857,9 +878,15 @@ push_gimp_sv (GimpParam *arg, int array_as_ref)
{
/* difficult */
AV *av = newAV ();
#if GIMP_CHECK_VERSION(1,3,0)
av_push (av, newSViv (arg->data.d_color.r));
av_push (av, newSViv (arg->data.d_color.g));
av_push (av, newSViv (arg->data.d_color.b));
#else
av_push (av, newSViv (arg->data.d_color.red ));
av_push (av, newSViv (arg->data.d_color.green));
av_push (av, newSViv (arg->data.d_color.blue ));
#endif
sv = (SV *)av; /* no newRV_inc, since we're getting autoblessed! */
}
break;

View File

@ -132,6 +132,7 @@ examples/dust
examples/clear_alpha
examples/warp-sharp
examples/fade-alpha
examples/circular_text
pxgettext
po/ChangeLog
po/Makefile.PL

View File

@ -45,7 +45,7 @@ if ($ARGV[0] ne "--writemakefile") {
repdup centerguide stampify goldenmean mirrorsplit
layerfuncs randomart1 glowing_steel frame_reshuffle frame_filter
logulator guide_remove guides_to_selection burst
layerfuncs bricks miff dust
layerfuncs bricks miff dust circular_text
);
@pdl_pins =
qw(

View File

@ -8,7 +8,7 @@ use Gimp::Util;
sub circular_text {
my ($image, $drawable, $choice) = @_;
$drawable->has_alpha or die __"You can't run this script without an ALPHA CHANNEL!!";
$drawable->has_alpha or die __"You can't run this script without an ALPHA CHANNEL!!\n";
my $test = 0;
$test = $drawable->type_with_alpha;
if ($test == INDEXEDA_IMAGE) {
@ -72,9 +72,9 @@ register "circular_shape",
"(c) 2001 M. Gherlone",
"20010512",
N_"<Image>/Filters/Map/Circular Shape...",
"*",
"GRAYA, RGBA",
[
[PF_RADIO, "direction", "the text orientation", 0, [Clockwise => 0, Unclockwise => 1]],
[PF_RADIO, "direction", "the text orientation", 0, [Clockwise => 0, Anticlockwise => 1]],
],
\&circular_text;