Changed gimp lib dir to lib/gimp/MAJOR.MINOR instead of

* configure.in: Changed gimp lib dir to lib/gimp/MAJOR.MINOR
  instead of lib/gimp/MAJOR.MINOR.MICRO
* script-fu/scripts: removed piechart, kanji-circle, kanji-neon

-Shawn
This commit is contained in:
Shawn Amundson 1997-12-14 06:05:44 +00:00
parent 31391252e5
commit e2784e82b5
6 changed files with 7 additions and 464 deletions

View File

@ -1,3 +1,9 @@
Sun Dec 14 00:06:00 CST 1997 Shawn T. Amundson <amundson@gimp.org>
* configure.in: Changed gimp lib dir to lib/gimp/MAJOR.MINOR
instead of lib/gimp/MAJOR.MINOR.MICRO
* script-fu/scripts: removed piechart, kanji-circle, kanji-neon
Sat Dec 13 19:41:35 CST 1997 Shawn T. Amundson <amundson@gimp.org>
* plug-ins/fuse/Makefile.am: fuse.c couldn't find gck/gck.h

View File

@ -240,7 +240,7 @@ dnl TVM: check for compiler characteristics
AC_C_INLINE
gimpdatadir=$datadir/$PACKAGE
gimpplugindir=$libdir/$PACKAGE/$VERSION
gimpplugindir=$libdir/$PACKAGE/$GIMP_MAJOR_VERSION_NUMBER.$GIMP_MINOR_VERSION_NUMBER
dnl This is for generating PDB docuemntation.
AC_PATH_PROG(EMACS, emacs)

View File

@ -46,15 +46,12 @@ scriptdata_DATA = \
hsv-graph.scm \
i26-gunya2.scm \
image-structure.scm \
kanji-circle.scm \
kanji-neon.scm \
land.scm \
lava.scm \
line-nova.scm \
mkbrush.scm \
neon-logo.scm \
perspective-shadow.scm \
pie-chart.scm \
predator.scm \
ripply-anim.scm \
round-corners.scm \

View File

@ -1,107 +0,0 @@
;; kanji-circle a script for The GIMP (漢字いり) -*-scheme-*-
;; Shuji Narazaki (narazaki@InetQ.or.jp)
;; Time-stamp: <1997/06/09 22:18:23 narazaki@InetQ.or.jp>
;; Version 0.8
(define (script-fu-kanji-circle text radius start-angle fill-angle
font font-size antialias)
(let* ((drawable-size (* 2.0 (+ radius (* 2 font-size)))) ; with padding
(img (car (gimp-image-new drawable-size drawable-size RGB)))
(BG-layer (car (gimp-layer-new img drawable-size drawable-size
RGBA_IMAGE "background" 100 NORMAL)))
(merged-layer #f)
(char-num (string-length text))
(radians (/ (* 2 *pi*) (/ char-num 2)))
(rad-90 (/ *pi* 2))
(center-x (/ drawable-size 2))
(center-y (/ drawable-size 2))
(desc 0)
(angle-list #f)
(letter "")
(new-layer #f)
(index 0))
(gimp-image-disable-undo img)
(gimp-image-add-layer img BG-layer 0)
(gimp-edit-fill img BG-layer)
;; change unit
(set! start-angle (* (/ (modulo start-angle 360) 360) 2 *pi*))
(set! fill-angle (* (/ fill-angle 360) 2 *pi*))
(set! radian-step (/ fill-angle char-num))
;; make width-list
(let ((temp-list '())
(temp-str #f)
(scale 0)
(temp #f))
(set! index 0)
(while (< index (/ char-num 2))
(set! angle-list (cons font-size angle-list))
(set! index (+ index 1)))
(set! temp 0)
(set! angle-list
(mapcar (lambda (angle)
(let ((tmp temp))
(set! temp (+ angle temp))
(+ tmp (/ angle 2))))
angle-list))
(set! scale (/ fill-angle temp))
(set! angle-list (mapcar (lambda (angle) (* scale angle)) angle-list)))
(set! index 0)
(while (< index (/ char-num 2))
(set! letter (substring text (* 2 index) (+ (* 2 index) 2)))
(if (not (equal? " " letter))
;; Running gimp-text with " " causes an error!
(let* ((new-layer (car (plug-in-vftext 1 img -1 0 0
letter
1 antialias
font-size PIXELS
"*" font "*" "*" "*" 0)))
(width (car (gimp-drawable-width new-layer)))
(height (car (gimp-drawable-height new-layer)))
(rotate-radius (- (/ height 2) desc))
(angle (+ start-angle (- (nth index angle-list) rad-90))))
(gimp-layer-translate new-layer
(+ center-x
(* radius (cos angle))
(* rotate-radius
(cos (if (< 0 fill-angle)
angle
(+ angle *pi*))))
(- (/ width 2)))
(+ center-y
(* radius (sin angle))
(* rotate-radius
(sin (if (< 0 fill-angle)
angle
(+ angle *pi*))))
(- (/ height 2))))
(gimp-rotate img new-layer 1
((if (< 0 fill-angle) + -) angle rad-90))))
(set! index (+ index 1)))
(gimp-layer-set-visible BG-layer 0)
(set! merged-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-layer-set-name merged-layer "kanji circle")
(gimp-layer-set-visible BG-layer 1)
(gimp-image-enable-undo img)
(gimp-display-new img)
(gimp-displays-flush)))
(script-fu-register "script-fu-kanji-circle"
"<Toolbox>/Xtns/Script-Fu/Logos/Kanji Circle"
"Kanji Circle (version 0.3)"
"Shuji Narazaki <narazaki@InetQ.or.jp>"
"Shuji Narazaki"
"1997"
""
SF-VALUE "Kanji Text" "\"ねうしとらうたつみうまひつじさるとりいぬい\""
SF-VALUE "Radius" "100"
SF-VALUE "Start-angle" "0"
SF-VALUE "Fill-angle" "360"
SF-VALUE "Font name" "\"min\""
SF-VALUE "Font Size" "24"
SF-TOGGLE "Antialias" TRUE
)
;; Local Variables:
;; buffer-file-coding-system: euc-japan
;; End:
;; end of kanji-circle.scm

View File

@ -1,131 +0,0 @@
;; KANJI-NEON (´Á»ú¤¤¤ê) -*-scheme-*-
;; Create a text effect that simulates neon lighting
;; Shuji Narazaki (narazaki@InetQ.or.jp)
;; Time-stamp: <1997/06/13 23:16:39 narazaki@InetQ.or.jp>
;; Version 0.7
(define (script-fu-kanji-neon glow-color tube-hue text size font)
(define (set-pt a index x y)
(prog1
(aset a (* index 2) x)
(aset a (+ (* index 2) 1) y)))
(define (neon-spline1)
(let* ((a (cons-array 6 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 127 145)
(set-pt a 2 255 255)
a))
(define (neon-spline2)
(let* ((a (cons-array 6 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 110 150)
(set-pt a 2 255 255)
a))
(define (neon-spline3)
(let* ((a (cons-array 6 'byte)))
(set-pt a 0 0 0)
(set-pt a 1 100 185)
(set-pt a 2 255 255)
a))
(let* ((img (car (gimp-image-new 256 256 RGB)))
(border (/ size 4))
(shrink (/ size 14))
(grow (/ size 40))
(feather (/ size 5))
(feather1 (/ size 25))
(feather2 (/ size 12))
(inc-shrink (/ size 100))
(glow-layer (car (plug-in-vftext 1 img -1 0 0 text border 1 size 1 ""
font "" "" "" 0)))
(width (car (gimp-drawable-width glow-layer)))
(height (car (gimp-drawable-height glow-layer)))
(bg-layer (car (gimp-layer-new img width height RGB_IMAGE "Neon Glow" 100 NORMAL)))
(selection 0)
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-disable-undo img)
;(gimp-display-new img) ; for debug
(gimp-image-resize img width height 0 0)
(gimp-image-add-layer img bg-layer 1)
(gimp-palette-set-background '(0 0 0))
(gimp-selection-layer-alpha img glow-layer)
;; make lines thick to avoid an unknown error of the following process
(gimp-selection-grow img 1)
(gimp-edit-fill img glow-layer)
(set! selection (car (gimp-selection-save img)))
(gimp-selection-none img)
(gimp-edit-fill img bg-layer)
(gimp-edit-fill img glow-layer)
(gimp-selection-load img selection)
(gimp-palette-set-background '(255 255 255))
(gimp-edit-fill img glow-layer)
(gimp-selection-shrink img shrink)
(gimp-palette-set-background '(0 0 0))
(gimp-edit-fill img selection)
(gimp-edit-fill img glow-layer)
(gimp-selection-none img)
(plug-in-gauss-rle 1 img glow-layer feather1 TRUE TRUE)
(gimp-selection-load img selection)
(plug-in-gauss-rle 1 img glow-layer feather2 TRUE TRUE)
(gimp-brightness-contrast img glow-layer -10 15)
(gimp-selection-none img)
(gimp-hue-saturation img glow-layer 0 tube-hue -15 70)
(gimp-selection-load img selection)
(gimp-selection-feather img inc-shrink)
(gimp-selection-shrink img inc-shrink)
(gimp-curves-spline img glow-layer 0 6 (neon-spline1))
(gimp-selection-load img selection)
(gimp-selection-feather img inc-shrink)
(gimp-selection-shrink img (* inc-shrink 2))
(gimp-curves-spline img glow-layer 0 6 (neon-spline2))
(gimp-selection-load img selection)
(gimp-selection-feather img inc-shrink)
(gimp-selection-shrink img (* inc-shrink 3))
(gimp-curves-spline img glow-layer 0 6 (neon-spline3))
(gimp-selection-load img selection)
(gimp-selection-grow img grow)
(gimp-selection-invert img)
(gimp-edit-clear img glow-layer)
(gimp-selection-invert img)
(gimp-selection-feather img feather)
(gimp-palette-set-background glow-color)
(gimp-edit-fill img bg-layer)
(gimp-selection-none img)
(gimp-layer-set-name glow-layer "Neon Tubes")
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)
(gimp-image-enable-undo img)
(gimp-display-new img)
(gimp-displays-flush)))
(script-fu-register "script-fu-kanji-neon"
"<Toolbox>/Xtns/Script-Fu/Logos/Kanji Neon"
"Kanji Neon Text Cyan (0.3)"
"Shuji Narazaki <narazaki@InetQ.or.jp>"
"Shuji Narazaki"
"1997"
""
SF-COLOR "Glow Color" '(38 211 255)
SF-VALUE "Tube Hue" "-170"
SF-VALUE "Text (ill-displayed)" "\"´Á»ú\""
SF-VALUE "Font Size (in pixels)" "100"
SF-VALUE "Font (string)" "\"min\"")
;; Local Variables:
;; buffer-file-coding-system: euc-japan
;; End:

View File

@ -1,222 +0,0 @@
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Pie chart script --- create simple pie charts from a list of value/color pairs
; Copyright (C) 1997 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 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.
; Constants
(define pi 3.141592653589793238462643383279502884)
(define epsilon 1.0e-8)
; Points
(define (make-point x y)
(cons x y))
(define (point-x point)
(car point))
(define (point-y point)
(cdr point))
; Convert a list of points to an array of doubles
(define (point-list->double-array point-list)
(let* ((how-many (length point-list))
(count 0)
(a (cons-array (* 2 how-many) 'double)))
(while point-list
(aset a (* 2 count) (point-x (car point-list)))
(aset a (+ 1 (* 2 count)) (point-y (car point-list)))
(set! point-list (cdr point-list))
(set! count (+ count 1)))
a))
; Returns the point on the image border which is intersected by the
; vector which starts at the center of the image and that has the
; specified angle
(define (intersect-with-border center width angle)
(let* ((vec-x (cos angle))
(vec-y (- (sin angle)))
(factor-x (if (> (abs vec-x) epsilon)
(max (/ (- center) vec-x)
(/ (- width center) vec-x))
-1))
(factor-y (if (> (abs vec-y) epsilon)
(max (/ (- center vec-y))
(/ (- width center) vec-y))
-1))
(factor (cond ((and (> factor-x 0) (> factor-y 0))
(min factor-x factor-y))
((> factor-x 0) factor-x)
(else factor-y))))
(make-point (+ center (* vec-x factor))
(+ center (* vec-y factor)))))
; On which side of the image does the point lie?
(define (which-side point width)
(let ((x (point-x point))
(y (point-y point)))
(cond ((< x epsilon) 'left)
((< y epsilon) 'top)
((< (abs (- x width)) epsilon) 'right)
((< (abs (- y width)) epsilon) 'bottom))))
; Tests whether a point comes after another point, even when their sides are equal
(define (point-after? point1 point2 side)
(cond ((eq? side 'top) (< (point-x point1) (point-x point2)))
((eq? side 'left) (> (point-y point1) (point-y point2)))
((eq? side 'bottom) (> (point-x point1) (point-x point2)))
((eq? side 'right) (< (point-y point1) (point-y point2)))))
; Rotates sides counter-clockwise
(define (next-side side)
(cond ((eq? side 'top) 'left)
((eq? side 'left) 'bottom)
((eq? side 'bottom) 'right)
((eq? side 'right) 'top)))
; Moves a point to the specified side
(define (move-point-to-side width point dest-side)
(cond ((eq? dest-side 'left) (make-point 0 (point-y point)))
((eq? dest-side 'right) (make-point width (point-y point)))
((eq? dest-side 'top) (make-point (point-x point) 0))
((eq? dest-side 'bottom) (make-point (point-x point) width))))
; Slides the initial point along the image border to the final point
; and returns a list of the visited points
(define (make-slide-point-list width point side final-point final-side)
(if (and (eq? side final-side)
(point-after? point final-point side))
(list point final-point)
(cons point
(make-slide-point-list width
(move-point-to-side width point (next-side side))
(next-side side)
final-point
final-side))))
; Creates an array of points ready for gimp-free-select
(define (create-slice-intersect-array center width angle1 angle2)
(let* ((inter-1 (intersect-with-border center width angle1))
(inter-2 (intersect-with-border center width angle2))
(point-list (cons (make-point center center)
(make-slide-point-list width
inter-1
(which-side inter-1 width)
inter-2
(which-side inter-2 width)))))
(cons (length point-list)
(point-list->double-array point-list))))
; Value/color pairs
(define (get-value value-color-pair)
(car value-color-pair))
(define (get-color value-color-pair)
(cadr value-color-pair))
(define (calc-total value-color-list)
(define (total-iter values total)
(if (null? values)
total
(total-iter (cdr values)
(+ total (get-value (car values))))))
(total-iter value-color-list 0))
; Misc
(define (degrees->radians angle)
(/ (* angle pi) 180.0))
; The main pie-chart function
(define (script-fu-pie-chart width value-color-list start-angle)
(define (paint-slices image drawable total angle1 values)
(if (not (null? values))
(let* ((item (car values))
(value (/ (get-value item) total))
(color (get-color item))
(angle2 (+ angle1
(* 2.0 pi value)))
(i-array (create-slice-intersect-array (/ (- width 1) 2)
width
angle1
angle2))
(num-points (car i-array))
(points (cdr i-array)))
(gimp-selection-none image)
(gimp-ellipse-select image 0 0 width width REPLACE TRUE FALSE 0)
(gimp-free-select image
(* 2 num-points)
points
INTERSECT
TRUE
FALSE
0)
(gimp-palette-set-background color)
(gimp-edit-fill image drawable)
(paint-slices image drawable total angle2 (cdr values)))))
(let* ((img (car (gimp-image-new width width RGB)))
(layer (car (gimp-layer-new img width width RGB_IMAGE "Pie chart" 100 NORMAL)))
(old-fg-color (car (gimp-palette-get-foreground)))
(old-bg-color (car (gimp-palette-get-background)))
(total (calc-total value-color-list)))
(gimp-image-disable-undo img)
(gimp-image-add-layer img layer 0)
(gimp-edit-fill img layer)
(paint-slices img
layer
total
(degrees->radians start-angle)
value-color-list)
(gimp-selection-none img)
(gimp-palette-set-foreground old-fg-color)
(gimp-palette-set-background old-bg-color)
(gimp-image-enable-undo img)
(gimp-display-new img)))
; Register!
(script-fu-register "script-fu-pie-chart"
"<Toolbox>/Xtns/Script-Fu/Misc/Pie chart"
"Pie chart"
"Federico Mena Quintero"
"Federico Mena Quintero"
"June 1997"
""
SF-VALUE "Width" "401"
SF-VALUE "Value/color list" "'((10 (255 0 0)) (20 (0 0 255)) (30 (0 255 0)) (40 (255 255 0)))"
SF-VALUE "Start angle" "0.0")