Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (script-fu-Firma2 InImage InLayer ul dl dr 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-context-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
- ((= ul TRUE) (gimp-paintbrush InLayer 0 2 line_points_1 PAINT-CONSTANT 0))
- )
- (cond
- ((= dl TRUE) (gimp-paintbrush InLayer 0 2 line_points_2 PAINT-CONSTANT 0))
- )
- (cond
- ((= dr TRUE) (gimp-paintbrush InLayer 0 2 line_points_3 PAINT-CONSTANT 0))
- )
- (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-Firma2"
- _"Firma v2"
- _""
- "Andrea Verdi"
- "Andrea Verdi"
- "2017,2018"
- "RGB*"
- SF-IMAGE "The Image" 0
- SF-DRAWABLE "The Layer" 0
- SF-TOGGLE _"Top Left (Angolo alto sx)" FALSE
- SF-TOGGLE _"Bottom Left (Angolo basso sx)" FALSE
- SF-TOGGLE _"Bottom Right (Angolo basso dx)" FALSE
- SF-TOGGLE _"Top Right (Angolo alto dx)" FALSE
- SF-COLOR _"Color of signature (Colore firma)" '(255 255 255)
- )
- (script-fu-menu-register "script-fu-Firma2"
- "<Image>/Filters/Image/")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement