Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;enable only works with bottom and right checkbox
- (define (script-fu-Firma InImage InLayer en bottom right ur fg)
- (gimp-image-undo-group-start InImage)
- (define line_points_1 (cons-array 4 'double)) ; line_points: Array of 4 doubles
- (define line_points_2 (cons-array 4 'double)) ; line_points: Array of 4 doubles
- (define line_points_3 (cons-array 4 'double)) ; line_points: Array of 4 doubles
- (define line_points_4 (cons-array 4 'double)) ; line_points: Array of 4 doubles
- (let* ((cur-width (car (gimp-image-width InImage)))
- (cur-height (car (gimp-image-height InImage)))
- (y (- cur-height 60))
- (x (- cur-width 245))
- )
- (aset line_points_1 0 190) ; x1
- (aset line_points_1 1 80) ; y1
- (aset line_points_1 2 690) ; x2
- (aset line_points_1 3 80) ; y2
- (aset line_points_2 0 190)
- (aset line_points_2 1 y)
- (aset line_points_2 2 690)
- (aset line_points_2 3 y)
- (aset line_points_3 0 x)
- (aset line_points_3 1 y)
- (aset line_points_3 2 690)
- (aset line_points_3 3 (+ x 500))
- (aset line_points_4 0 x)
- (aset line_points_4 1 80)
- (aset line_points_4 2 (+ x 500))
- (aset line_points_4 3 80)
- )
- (gimp-context-set-paint-mode NORMAL-MODE)
- (gimp-context-set-background '(000 000 000))
- (gimp-context-set-foreground fg)
- (gimp-context-set-paint-method "gimp-paintbrush")
- (gimp-brushes-set-brush "Firma")
- (gimp-context-set-brush-force 1.0)
- (gimp-context-set-brush-size 500)
- (gimp-context-set-brush-angle 0.0)
- (gimp-context-set-brush-aspect-ratio 0.0)
- (cond ;ULTIME MOD
- ((= en TRUE) ;ULTIME MOD
- (cond
- ((= bottom FALSE) (gimp-paintbrush InLayer 0 2 line_points_1 PAINT-CONSTANT 0))
- ((= bottom TRUE)
- (cond ((= right TRUE) (gimp-paintbrush InLayer 0 2 line_points_3 PAINT-CONSTANT 0))
- ((= right FALSE) (gimp-paintbrush InLayer 0 2 line_points_2 PAINT-CONSTANT 0)))
- )
- )
- )) ;ULTIME MOD
- (cond
- ((= ur TRUE) (gimp-paintbrush InLayer 0 2 line_points_4 PAINT-CONSTANT 0))
- )
- (gimp-image-undo-group-end InImage)
- (gimp-displays-flush)
- )
- (script-fu-register
- "script-fu-Firma"
- _"Firma"
- _"With Bottom and Right = false -> Upper Left, With Bottom = True and Right = False -> Bottom Left, With Bottom = True and Right = True -> Bottom Right"
- "Andrea Verdi"
- "Andrea Verdi"
- "2017,2018"
- "RGB*"
- SF-IMAGE "The Image" 0
- SF-DRAWABLE "The Layer" 0
- SF-TOGGLE _"Enable Bottom and Right" FALSE
- SF-TOGGLE _"Bottom (Parte inferiore)" FALSE
- SF-TOGGLE _"Right (Destra)" FALSE
- SF-TOGGLE _"Top Right (Parte superiore Destra)" FALSE
- SF-COLOR _"Color of signature (Colore firma)" '(255 255 255)
- )
- (script-fu-menu-register "script-fu-Firma"
- "<Image>/Filters/Image/")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement