Files
gimp/plug-ins/script-fu/scripts/ts-helloworld.scm
Kevin Cozens 15f00f294c Added reverse-layers.sct. Moved ts-helloworld.sct to the list of test
2006-07-02  Kevin Cozens  <kcozens@cvs.gnome.org>

	* scripts/Makefile.am: Added reverse-layers.sct. Moved
	ts-helloworld.sct to the list of test scripts.

	* scripts/reverse-layers.sct: new script from Akkana Peck which
	reverses the layers in an image.

	* tiny-fu/tiny-fu.c
	* scripts/3d-outline.sct
	* scripts/3dTruchet.sct
	* scripts/alien-glow-arrow.sct
	* scripts/alien-glow-bar.sct
	* scripts/alien-glow-bullet.sct
	* scripts/alien-glow-button.sct
	* scripts/alien-glow-logo.sct
	* scripts/alien-neon-logo.sct
	* scripts/basic1-logo.sct
	* scripts/basic2-logo.sct
	* scripts/beveled-button.sct
	* scripts/beveled-pattern-arrow.sct
	* scripts/beveled-pattern-bullet.sct
	* scripts/beveled-pattern-button.sct
	* scripts/beveled-pattern-heading.sct
	* scripts/beveled-pattern-hrule.sct
	* scripts/blended-logo.sct
	* scripts/bovinated-logo.sct
	* scripts/camo.sct
	* scripts/carved-logo.sct
	* scripts/chalk.sct
	* scripts/chip-away.sct
	* scripts/chrome-logo.sct
	* scripts/comic-logo.sct
	* scripts/contactsheet.sct
	* scripts/coolmetal-logo.sct
	* scripts/crystal-logo.sct
	* scripts/flatland.sct
	* scripts/frosty-logo.sct
	* scripts/gimp-headers.sct
	* scripts/gimp-labels.sct
	* scripts/glossy.sct
	* scripts/glowing-logo.sct
	* scripts/gradient-bevel-logo.sct
	* scripts/guides-new.sct
	* scripts/i26-gunya2.sct
	* scripts/land.sct
	* scripts/neon-logo.sct
	* scripts/news-text.sct
	* scripts/pupi-button.sct
	* scripts/rendermap.sct
	* scripts/sota-chrome-logo.sct
	* scripts/speed-text.sct
	* scripts/sphere.sct
	* scripts/starburst-logo.sct
	* scripts/starscape-logo.sct
	* scripts/swirltile.sct
	* scripts/swirly-pattern.sct
	* scripts/t-o-p-logo.sct
	* scripts/test-sphere.sct
	* scripts/text-circle.sct
	* scripts/textured-logo.sct
	* scripts/title-header.sct
	* scripts/truchet.sct
	* scripts/ts-helloworld.sct: Move the script categories that were
	in Xtns->Tiny-Fu directly into Xtns. Language specific tools (e.g.
	Refresh, Console) remain in language-specific menus. Bug #145507.
	Based on changes made by Akkana Peck to Script-Fu.
2006-07-02 16:35:49 +00:00

68 lines
2.2 KiB
Scheme

; "Hello, World" Test v1.00 February 29, 2004
; by Kevin Cozens <kcozens@interlog.com>
;
; Creates an image with the text "Hello, World!"
; This was the first TinyScheme based script ever created and run for the
; 2.x version of the GIMP.
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
; Tiny-Fu first successfully ran this script at 2:07am on March 6, 2004.
(define (tiny-fu-helloworld text font size colour)
(let*
(
(width 10)
(height 10)
(img (car (gimp-image-new width height RGB)))
(text-layer)
)
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-context-set-foreground colour)
(set! text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font)))
(set! width (car (gimp-drawable-width text-layer)))
(set! height (car (gimp-drawable-height text-layer)))
(gimp-image-resize img width height 0 0)
(gimp-image-undo-enable img)
(gimp-display-new img)
(gimp-context-pop)
)
)
(tiny-fu-register "tiny-fu-helloworld"
_"Hello World"
"Creates an image with a user specified text string."
"Kevin Cozens <kcozens@interlog.com>"
"Kevin Cozens"
"February 29, 2004"
""
SF-STRING _"Text string" "Hello, World!"
SF-FONT _"Font" "Sans"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-COLOR _"Color" '(0 0 0)
)
(tiny-fu-menu-register "tiny-fu-helloworld"
"<Toolbox>/Xtns/Test")