mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
fixed description.
2003-06-17 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/scripts/select-to-brush.scm: fixed description.
This commit is contained in:
parent
f8ebd89ba9
commit
f92033d724
|
@ -1,3 +1,7 @@
|
|||
2003-06-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/script-fu/scripts/select-to-brush.scm: fixed description.
|
||||
|
||||
2003-06-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpfontmenu.c
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
; The GIMP -- an image manipulation program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; Selection-to-brush
|
||||
; Selection-to-brush
|
||||
; Copyright (c) 1997 Adrian Likins
|
||||
; aklikins@eos.ncsu.edu
|
||||
;
|
||||
; Takes the current selection, saves it as a brush, and makes it the active brush..
|
||||
;
|
||||
; NOTE: You need to change the home dir to the approriate place.
|
||||
; Also, in .13 there are bugs in the gbr plugin that might make it sigsegv
|
||||
; Takes the current selection, saves it as a brush, and makes it the
|
||||
; active brush..
|
||||
;
|
||||
; Parts of this script from Sven Neuman's Drop-Shadow and
|
||||
; Seth Burgess's mkbrush scripts.
|
||||
|
@ -28,9 +26,12 @@
|
|||
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
|
||||
(define (script-fu-selection-to-brush image drawable desc filename spacing)
|
||||
(let* (
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(define (script-fu-selection-to-brush image
|
||||
drawable
|
||||
desc
|
||||
filename
|
||||
spacing)
|
||||
(let* ((type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(old-bg (car (gimp-palette-get-background))))
|
||||
|
||||
(set! selection-bounds (gimp-selection-bounds image))
|
||||
|
@ -62,12 +63,18 @@
|
|||
GRAY
|
||||
RGB))
|
||||
|
||||
(set! brush-image (car (gimp-image-new selection-width selection-height brush_image_type)))
|
||||
(set! brush-image (car (gimp-image-new selection-width
|
||||
selection-height
|
||||
brush_image_type)))
|
||||
|
||||
(set! brush-draw
|
||||
(car (gimp-layer-new brush-image
|
||||
selection-width
|
||||
selection-height brush_draw_type "Brush" 100 NORMAL)))
|
||||
selection-height
|
||||
brush_draw_type
|
||||
"Brush"
|
||||
100
|
||||
NORMAL)))
|
||||
|
||||
(gimp-image-add-layer brush-image brush-draw 0)
|
||||
|
||||
|
@ -84,10 +91,10 @@
|
|||
|
||||
(set! data-dir (car (gimp-gimprc-query "gimp_dir")))
|
||||
(set! filename2 (string-append data-dir
|
||||
"/brushes/"
|
||||
filename
|
||||
(number->string image)
|
||||
".gbr"))
|
||||
"/brushes/"
|
||||
filename
|
||||
(number->string image)
|
||||
".gbr"))
|
||||
|
||||
(file-gbr-save 1 brush-image brush-draw filename2 "" spacing desc)
|
||||
(gimp-brushes-refresh)
|
||||
|
@ -102,13 +109,13 @@
|
|||
|
||||
(script-fu-register "script-fu-selection-to-brush"
|
||||
_"<Image>/Script-Fu/Selection/To Brush..."
|
||||
"Convert a selection to a greyscale brush"
|
||||
"Convert a selection to a brush"
|
||||
"Adrian Likins <adrian@gimp.org>"
|
||||
"Adrian Likins"
|
||||
"10/07/97"
|
||||
"RGB* GRAY*"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-STRING _"Brush Name" "My Brush"
|
||||
SF-STRING _"Filename" "mybrush"
|
||||
SF-ADJUSTMENT _"Spacing" '(25 0 1000 1 1 1 0))
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-STRING _"Brush Name" "My Brush"
|
||||
SF-STRING _"Filename" "mybrush"
|
||||
SF-ADJUSTMENT _"Spacing" '(25 0 1000 1 1 1 0))
|
||||
|
|
Loading…
Reference in a new issue