see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann 1999-02-26 19:14:25 +00:00
parent 7d749f4218
commit 7af79909a1
3 changed files with 14 additions and 10 deletions

View File

@ -244,8 +244,8 @@ is with alpha or not. Example: imagetype: RGB -> RGB_IMAGE (or RGBA_IMAGE).
=cut
sub gimp_image_layertype {
my $type = $_[0]->base_type;
$type == RGB ? $alpha ? RGBA_IMAGE : RGB_IMAGE :
$type == GRAY ? $alpha ? GRAYA_IMAGE : GRAY_IMAGE :
$type == RGB ? $alpha ? RGBA_IMAGE : RGB_IMAGE :
$type == GRAY ? $alpha ? GRAYA_IMAGE : GRAY_IMAGE :
$type == INDEXED ? $alpha ? INDEXEDA_IMAGE : INDEXED_IMAGE :
die;
}

View File

@ -26,22 +26,24 @@
#[terral] input levels of 0, .24, 113 [22:11]
#[terral] --end of script [22:12]
use Gimp;
use Gimp 1.06;
use Gimp::Fu;
use Gimp::Util;
# Gimp::set_trace(TRACE_ALL);
register
"terraltext",
"Make a cool text bumpmap thingy",
"Creates a bumpmap text thingy. Can work using the current layer as a bumpmap or make a solid noise layer for it.",
"Does a neat text render effect. If you uncheck the box, it uses the current layer. ".
"Otherwise, it overwrites the current layer and uses a solid noise",
"Seth Burgess",
"Seth Burgess <sjburges\@gimp.org>",
"1999-02-24",
"1999-02-26",
"<Image>/Filters/Render/Terral Text",
"RGB*",
"RGB*,GRAY*",
[
[ PF_TOGGLE, "Solid Noise?", "Say yes here", "Either use solid noise or the current background", 0 ],
[ PF_RADIO, "solid_noise", "The Texture Type", 0, [["solid noise",1],["current picture",0]]],
[ PF_FONT, "helvetica", "Font Name", "-*-helvetica-medium-r-normal-*-*-240-*-*-p-*-iso8859-1" ],
[ PF_STRING, "Text", "Enter your Text to be Terral-ified", "TerralText"],
[ PF_SLIDER, "Blur Amount", "Blur Amount", 10, [0,26,1]],
@ -60,8 +62,10 @@ sub {
# FIXME: I should endeavour to find out what kind of image I'm talking
# about before blindly apply a type of layer. Oh well. Call it RGBA
# for now.
# Hello, Seth.. look at this:
$textlayer = $img->layer_new($img->width, $img->height,RGBA_IMAGE,
$textlayer = $img->layer_new($img->width, $img->height, $img->layertype(1),
"TextLayer", 100, 0);
$img->add_layer($textlayer,1);
palette_set_background([255,255,255]);

View File

@ -162,8 +162,8 @@ sub tex_string_to_float {
# register the script
register "tex_string_to_float", "Turn a TeX-string into floating layer", "Takes a TeX string as input and creates a floating layer of the rendered string in the current layer in the foreground color.",
"Dov Grobgeld <dov\@imagic.weizmann.ac.il>", "Dov Grobgeld",
"1998-11-03",
"<Image>/Perl-Fu/TeX String",
"1999-02-26",
"<Image>/Filters/Render/TeX String",
"*",
[
[PF_STRING, "Input file", "TeX macro file to input", ""],