Commit d3811155 authored by Alexandre Prokoudine's avatar Alexandre Prokoudine

Add obsoleted scripts from gimp-2-8: File/Create/ and Filters/Alpha to Logo

parent 06920a0f
## Process this file with automake to produce Makefile.in
SUBDIRS = brushes patterns
SUBDIRS = brushes patterns scripts
......@@ -26,6 +26,7 @@ brushes/Geometry/Makefile
brushes/Splatters/Makefile
brushes/Texture/Makefile
patterns/Makefile
scripts/Makefile
])
AC_OUTPUT
; 3d-outlined-patterned-shadowed-and-bump-mapped-logo :)
; creates outlined border of a text with patterns
;
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; 3d-outline creates outlined border of a text with patterns
; Copyright (C) 1998 Hrvoje Horvat
;
; 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 3 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, see <http://www.gnu.org/licenses/>.
(define (apply-3d-outline-logo-effect img
logo-layer
text-pattern
outline-blur-radius
shadow-blur-radius
bump-map-blur-radius
noninteractive
s-offset-x
s-offset-y)
(let* (
(width (car (gimp-drawable-width logo-layer)))
(height (car (gimp-drawable-height logo-layer)))
(bg-layer (car (gimp-layer-new img width height
RGB-IMAGE "Background" 100 NORMAL-MODE)))
(pattern-layer (car (gimp-layer-new img width height
RGBA-IMAGE "Pattern" 100 NORMAL-MODE)))
(alpha-layer 0)
(shadow-layer 0)
(pattern-mask 0)
(floating-sel 0)
)
(gimp-context-push)
(gimp-selection-none img)
(script-fu-util-image-resize-from-layer img logo-layer)
(script-fu-util-image-add-layers img pattern-layer bg-layer)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill bg-layer BACKGROUND-FILL)
(gimp-edit-clear pattern-layer)
(gimp-layer-set-lock-alpha logo-layer TRUE)
(gimp-context-set-foreground '(0 0 0))
(gimp-edit-fill logo-layer FOREGROUND-FILL)
(gimp-layer-set-lock-alpha logo-layer FALSE)
(plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer outline-blur-radius TRUE TRUE)
(gimp-item-set-visible pattern-layer FALSE)
(set! alpha-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(plug-in-edge RUN-NONINTERACTIVE img alpha-layer 2 1 0)
(gimp-item-set-name alpha-layer "Bump map")
(set! shadow-layer (car (gimp-layer-copy alpha-layer TRUE)))
(gimp-item-set-name shadow-layer "Edges")
(script-fu-util-image-add-layers img shadow-layer)
(plug-in-gauss-iir RUN-NONINTERACTIVE img alpha-layer bump-map-blur-radius TRUE TRUE)
(gimp-selection-all img)
(gimp-context-set-pattern text-pattern)
(gimp-edit-bucket-fill pattern-layer
PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(plug-in-bump-map noninteractive img pattern-layer alpha-layer
110.0 45.0 4 0 0 0 0 TRUE FALSE 0)
(set! pattern-mask (car (gimp-layer-create-mask pattern-layer ADD-ALPHA-MASK)))
(gimp-layer-add-mask pattern-layer pattern-mask)
(gimp-selection-all img)
(gimp-edit-copy shadow-layer)
(set! floating-sel (car (gimp-edit-paste pattern-mask FALSE)))
(gimp-floating-sel-anchor floating-sel)
(gimp-layer-remove-mask pattern-layer MASK-APPLY)
(gimp-invert shadow-layer)
(gimp-item-set-name shadow-layer "Drop shadow")
(plug-in-gauss-iir RUN-NONINTERACTIVE img shadow-layer shadow-blur-radius TRUE TRUE)
(gimp-drawable-offset shadow-layer
FALSE OFFSET-BACKGROUND s-offset-x s-offset-y)
(gimp-item-set-visible alpha-layer FALSE)
(gimp-item-set-visible pattern-layer TRUE)
;;(set! final (car (gimp-image-flatten img)))
(gimp-context-pop)
)
)
(define (script-fu-3d-outline-logo-alpha img
logo-layer
text-pattern
outline-blur-radius
shadow-blur-radius
bump-map-blur-radius
noninteractive
s-offset-x
s-offset-y)
(begin
(gimp-image-undo-group-start img)
(apply-3d-outline-logo-effect img logo-layer text-pattern
outline-blur-radius shadow-blur-radius
bump-map-blur-radius noninteractive
s-offset-x s-offset-y)
(gimp-image-undo-group-end img)
(gimp-displays-flush)
)
)
(script-fu-register "script-fu-3d-outline-logo-alpha"
_"3D _Outline..."
_"Outline the selected region (or alpha) with a pattern and add a drop shadow"
"Hrvoje Horvat (hhorvat@open.hr)"
"Hrvoje Horvat"
"07 April, 1998"
"RGBA"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-PATTERN _"Pattern" "Parque #1"
SF-ADJUSTMENT _"Outline blur radius" '(5 1 200 1 10 0 1)
SF-ADJUSTMENT _"Shadow blur radius" '(10 1 200 1 10 0 1)
SF-ADJUSTMENT _"Bumpmap (alpha layer) blur radius" '(5 1 200 1 10 0 1)
SF-TOGGLE _"Default bumpmap settings" TRUE
SF-ADJUSTMENT _"Shadow X offset" '(0 0 200 1 5 0 1)
SF-ADJUSTMENT _"Shadow Y offset" '(0 0 200 1 5 0 1)
)
(script-fu-menu-register "script-fu-3d-outline-logo-alpha"
"<Image>/Filters/Alpha to Logo")
(define (script-fu-3d-outline-logo text-pattern
text
size
font
outline-blur-radius
shadow-blur-radius
bump-map-blur-radius
noninteractive
s-offset-x
s-offset-y)
(let* (
(img (car (gimp-image-new 256 256 RGB)))
(text-layer (car (gimp-text-fontname img -1 0 0 text 30 TRUE size PIXELS font)))
)
(gimp-image-undo-disable img)
(apply-3d-outline-logo-effect img text-layer text-pattern
outline-blur-radius shadow-blur-radius
bump-map-blur-radius noninteractive
s-offset-x s-offset-y)
(gimp-image-undo-enable img)
(gimp-display-new img)
)
)
(script-fu-register "script-fu-3d-outline-logo"
_"3D _Outline..."
_"Create a logo with outlined text and a drop shadow"
"Hrvoje Horvat (hhorvat@open.hr)"
"Hrvoje Horvat"
"07 April, 1998"
""
SF-PATTERN _"Pattern" "Parque #1"
SF-STRING _"Text" "GIMP"
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "RoostHeavy"
SF-ADJUSTMENT _"Outline blur radius" '(5 1 200 1 10 0 1)
SF-ADJUSTMENT _"Shadow blur radius" '(10 1 200 1 10 0 1)
SF-ADJUSTMENT _"Bumpmap (alpha layer) blur radius" '(5 1 200 1 10 0 1)
SF-TOGGLE _"Default bumpmap settings" TRUE
SF-ADJUSTMENT _"Shadow X offset" '(0 0 200 1 5 0 1)
SF-ADJUSTMENT _"Shadow Y offset" '(0 0 200 1 5 0 1)
)
(script-fu-menu-register "script-fu-3d-outline-logo"
"<Image>/File/Create/Logos")
; GIMP - The GNU 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 3 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, see <http://www.gnu.org/licenses/>.
;
; 3dTruchet - a script to create Truchet patterns
; by Adrian Likins <aklikins@eos.ncsu.edu>
; http://www4.ncsu.edu/~aklikins/
; version about .8 give or take
;
; Lots of thanks to Quartic for his help.
;
;
; The utility of this script is left as an exercise for the reader.
(define (center-ellipse img
cx
cy
rx
ry
op
aa
feather
frad)
(gimp-context-push)
(gimp-context-set-antialias aa)
(gimp-context-set-feather feather)
(gimp-context-set-feather-radius frad frad)
(gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
(gimp-context-pop)
)
(define (use-tile img
drawable
height
width
img2
drawable2
xoffset
yoffset)
(gimp-edit-copy drawable2)
(let (
(floating-sel (car (gimp-edit-paste drawable FALSE)))
)
(gimp-layer-set-offsets floating-sel xoffset yoffset)
(gimp-floating-sel-anchor floating-sel)
)
)
(define (create-tile img
drawable1
drawable2
size
thickness
backcolor
begincolor
endcolor
supersample)
(let* (
(half-thickness (/ thickness 2))
(outer-radius (+ (/ size 2) half-thickness))
(inner-radius (- (/ size 2) half-thickness))
)
(gimp-selection-all img)
(gimp-context-set-background backcolor)
(gimp-edit-fill drawable1 BACKGROUND-FILL)
(let* (
(tempSize (* size 3))
(temp-img (car (gimp-image-new tempSize tempSize RGB)))
(temp-draw (car (gimp-layer-new temp-img tempSize tempSize
RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
(temp-draw2 (car (gimp-layer-new temp-img tempSize tempSize
RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
)
(gimp-image-undo-disable temp-img)
(gimp-image-insert-layer temp-img temp-draw 0 0)
(gimp-image-insert-layer temp-img temp-draw2 0 0)
(gimp-context-set-background backcolor)
(gimp-edit-fill temp-draw BACKGROUND-FILL)
(gimp-edit-fill temp-draw2 BACKGROUND-FILL)
;weird aint it
(gimp-context-set-background begincolor)
(gimp-context-set-foreground endcolor)
(center-ellipse temp-img size size outer-radius outer-radius
CHANNEL-OP-REPLACE TRUE FALSE 0)
(center-ellipse temp-img size size inner-radius inner-radius
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
(center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius
CHANNEL-OP-ADD TRUE FALSE 0)
(center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
(gimp-edit-blend temp-draw FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
supersample 3 0.2 TRUE
size size (* size 2) (/ size 2))
(center-ellipse temp-img size (* size 2) outer-radius outer-radius
CHANNEL-OP-REPLACE TRUE FALSE 0)
(center-ellipse temp-img size (* size 2) inner-radius inner-radius
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
(center-ellipse temp-img (* size 2) size outer-radius outer-radius
CHANNEL-OP-ADD TRUE FALSE 0)
(center-ellipse temp-img (* size 2) size inner-radius inner-radius
CHANNEL-OP-SUBTRACT TRUE FALSE 0)
;(gimp-edit-fill temp-img temp-draw2 BACKGROUND-FILL)
(gimp-edit-blend temp-draw2 FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
supersample 3 0.2 TRUE
size size (* size 2) (* size 2))
(gimp-selection-none temp-img)
(gimp-image-resize temp-img size size (- size) (- size))
; woo hoo it works....finally...
(gimp-selection-all temp-img)
(gimp-edit-copy temp-draw)
(let ((floating-sel (car (gimp-edit-paste drawable2 FALSE))))
(gimp-floating-sel-anchor floating-sel))
(gimp-edit-copy temp-draw2)
(let ((floating-sel (car (gimp-edit-paste drawable1 FALSE))))
(gimp-floating-sel-anchor floating-sel))
;(let ((drawble (car (gimp-drawable-transform-flip-simple img drawable1
; ORIENTATION-HORIZONTAL
; TRUE 0 TRUE)))))
;(gimp-display-new temp-img)
(gimp-image-delete temp-img)
)
)
)
(define (script-fu-3dtruchet size
thickness
backcolor
begincolor
endcolor
supersample
xtiles
ytiles)
(let* (
(width (* size xtiles))
(height (* size ytiles))
(img (car (gimp-image-new width height RGB)))
(tile (car (gimp-image-new size size RGB)))
(layer-one (car (gimp-layer-new img width height
RGB-IMAGE "Rambis" 100 NORMAL-MODE)))
(tiledraw1 (car (gimp-layer-new tile size size
RGB-IMAGE "Johnson" 100 NORMAL-MODE)))
(tiledraw2 (car (gimp-layer-new tile size size
RGB-IMAGE "Cooper" 100 NORMAL-MODE)))
(Xindex 0)
(Yindex 0)
)
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-image-undo-disable tile)
(gimp-image-insert-layer img layer-one 0 0)
(gimp-image-insert-layer tile tiledraw1 0 0)
(gimp-image-insert-layer tile tiledraw2 0 0)
;just to look a little better
(gimp-selection-all img)
(gimp-context-set-background backcolor)
(gimp-edit-fill layer-one BACKGROUND-FILL)
(gimp-selection-none img)
(create-tile tile tiledraw1 tiledraw2 size thickness
backcolor begincolor endcolor supersample)
(while (<= Xindex xtiles)
(while (<= Yindex ytiles)
(if (= (rand 2) 0)
(use-tile img layer-one height width tile
tiledraw1 (* Xindex size) (* Yindex size))
(use-tile img layer-one height width tile
tiledraw2 (* Xindex size) (* Yindex size))
)
(set! Yindex (+ Yindex 1))
)
(set! Yindex 0)
(set! Xindex (+ Xindex 1))
)
(gimp-image-delete tile)
(gimp-image-undo-enable img)
(gimp-display-new img)
(gimp-context-pop)
)
)
(script-fu-register "script-fu-3dtruchet"
_"3_D Truchet..."
_"Create an image filled with a 3D Truchet pattern"
"Adrian Likins <aklikins@eos.ncsu.edu>"
"Adrian Likins"
"1997"
""
SF-ADJUSTMENT _"Block size" '(64 5 1000 1 10 0 1)
SF-ADJUSTMENT _"Thickness" '(12 2 100 1 10 0 1)
SF-COLOR _"Background color" "white"
SF-COLOR _"Start blend" "black"
SF-COLOR _"End blend" "white"
SF-TOGGLE _"Supersample" TRUE
SF-ADJUSTMENT _"Number of X tiles" '(5 1 1000 1 10 0 1)
SF-ADJUSTMENT _"Number of Y tiles" '(5 1 1000 1 10 0 1)
)
(script-fu-menu-register "script-fu-3dtruchet"
"<Image>/File/Create/Patterns")
## Process this file with automake to produce Makefile.in
scriptdatadir = $(GIMP_DATA_DIR)/scripts
scripts = \
3d-outline.scm \
3dTruchet.scm \
alien-glow-arrow.scm \
alien-glow-bar.scm \
alien-glow-bullet.scm \
alien-glow-button.scm \
alien-glow-logo.scm \
alien-neon-logo.scm \
basic1-logo.scm \
basic2-logo.scm \
beveled-button.scm \
beveled-pattern-arrow.scm \
beveled-pattern-bullet.scm \
beveled-pattern-button.scm \
beveled-pattern-heading.scm \
beveled-pattern-hrule.scm \
blended-logo.scm \
bovinated-logo.scm \
camo.scm \
carved-logo.scm \
chalk.scm \
chip-away.scm \
chrome-logo.scm \
comic-logo.scm \
coolmetal-logo.scm \
crystal-logo.scm \
flatland.scm \
frosty-logo.scm \
glossy.scm \
glowing-logo.scm \
gradient-bevel-logo.scm \
i26-gunya2.scm \
land.scm \
neon-logo.scm \
news-text.scm \
pupi-button.scm \
rendermap.scm \
sota-chrome-logo.scm \
speed-text.scm \
starscape-logo.scm \
swirltile.scm \
swirly-pattern.scm \
t-o-p-logo.scm \
text-circle.scm \
textured-logo.scm \
title-header.scm \
truchet.scm
scriptdata_DATA = $(scripts)
EXTRA_DIST = $(scripts)
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Alien Glow themed arrows for web pages
; Copyright (c) 1997 Adrian Likins
; aklikins@eos.ncsu.edu
;
;
; Based on code from
; Federico Mena Quintero
; federico@nuclecu.unam.mx
;
; 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 3 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, see <http://www.gnu.org/licenses/>.
(define (script-fu-alien-glow-right-arrow size
orientation
glow-color
bg-color
flatten)
; some local helper functions, better to not define globally,
; since otherwise the definitions could be clobbered by other scripts.
(define (map proc seq)
(if (null? seq)
'()
(cons (proc (car seq))
(map proc (cdr seq))
)
)
)
(define (for-each proc seq)
(if (not (null? seq))
(begin
(proc (car seq))
(for-each proc (cdr seq))
)
)
)
(define (make-point x y)
(cons x y)
)
(define (point-x p)
(car p)
)
(define (point-y p)
(cdr p)
)
(define (point-list->double-array point-list)
(define (convert points array pos)
(if (not (null? points))
(begin
(aset array (* 2 pos) (point-x (car points)))
(aset array (+ 1 (* 2 pos)) (point-y (car points)))
(convert (cdr points) array (+ pos 1))
)
)
)
(let* (
(how-many (length point-list))
(a (cons-array (* 2 how-many) 'double))
)
(convert point-list a 0)
a
)
)
(define (make-arrow size
offset)
(list (make-point offset offset)
(make-point (- size offset) (/ size 2))
(make-point offset (- size offset))
)
)
(define (rotate-points points size orientation)
(map (lambda (p)
(let ((px (point-x p))
(py (point-y p)))
(cond ((= orientation 0) (make-point px py)) ; right
((= orientation 1) (make-point (- size px) py)) ; left
((= orientation 2) (make-point py (- size px))) ; up
((= orientation 3) (make-point py px)) ; down
)
)
)
points
)
)
; the main function
(let* (
(img (car (gimp-image-new size size RGB)))
(grow-amount (/ size 12))
(blur-radius (/ size 3))
(offset (/ size 6))
(ruler-layer (car (gimp-layer-new img
size size RGBA-IMAGE
_"Arrow" 100 NORMAL-MODE)))
(glow-layer (car (gimp-layer-new img
size size RGBA-IMAGE
_"Alien Glow" 100 NORMAL-MODE)))
(bg-layer (car (gimp-layer-new img
size size RGB-IMAGE
_"Background" 100 NORMAL-MODE)))
(big-arrow (point-list->double-array
(rotate-points (make-arrow size offset)
size orientation)))
)
(gimp-context-push)
(gimp-context-set-defaults)
(gimp-image-undo-disable img)
;(gimp-image-resize img (+ length height) (+ height height) 0 0)
(gimp-image-insert-layer img bg-layer 0 1)
(gimp-image-insert-layer img glow-layer 0 -1)
(gimp-image-insert-layer img ruler-layer 0 -1)
(gimp-edit-clear glow-layer)
(gimp-edit-clear ruler-layer)
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
(gimp-context-set-foreground '(103 103 103))
(gimp-context-set-background '(0 0 0))
(gimp-edit-blend ruler-layer FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
FALSE 0 0 TRUE
0 0 size size)
(gimp-selection-grow img grow-amount)
(gimp-context-set-foreground glow-color)
(gimp-edit-fill glow-layer FOREGROUND-FILL)
(gimp-selection-none img)
(plug-in-gauss-rle RUN-NONINTERACTIVE img glow-layer blur-radius TRUE TRUE)
(gimp-context-set-background bg-color)
(gimp-edit-fill bg-layer BACKGROUND-FILL)
(if (= flatten TRUE)
(gimp-image-flatten img)
)
(gimp-image-undo-enable img)
(gimp-display-new img)
(gimp-context-pop)
)
)
(script-fu-register "script-fu-alien-glow-right-arrow"
_"_Arrow..."
_"Create an arrow graphic with an eerie glow for web pages"
"Adrian Likins"
"Adrian Likins"
"1997"
""
SF-ADJUSTMENT _"Size" '(32 5 150 1 10 0 1)
SF-OPTION _"Orientation" '(_"Right" _"Left" _"Up" _"Down")
SF-COLOR _"Glow color" '(63 252 0)
SF-COLOR _"Background color" "black"
SF-TOGGLE _"Flatten image" TRUE
)
(script-fu-menu-register "script-fu-alien-glow-right-arrow"
"<Image>/File/Create/Web Page Themes/Alien Glow")
; GIMP - The GNU Image Manipulation Program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Alien Glow themed hrule for web pages
; Copyright (c) 1997 Adrian Likins
; aklikins@eos.ncsu.edu
;
;
; 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 3 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, see <http://www.gnu.org/licenses/>.
(define (script-fu-alien-glow-horizontal-ruler length
height
glow-color
bg-color
flatten)
(let* (
(img (car (gimp-image-new height length RGB)))
(border (/ height 4))
(ruler-layer (car (gimp-layer-new img
(+ length height) (+ height height)
RGBA-IMAGE _"Bar" 100 NORMAL-MODE)))
(glow-layer (car (gimp-layer-new img
(+ length height) (+ height height)