-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfilled_ellipse.scm
30 lines (27 loc) · 1.07 KB
/
filled_ellipse.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(define (draw-an-ellipse image drawable radius)
(letrec ([img-bnds (gimp-selection-bounds image)]
[ofIMG (lambda (x) (list-ref img-bnds x))]
[x (ofIMG 1)]
[y (ofIMG 2)]
[width (- (ofIMG 3)
x)]
[height (- (ofIMG 4)
y)])
(gimp-context-push)
(gimp-image-select-ellipse image 2 x y width height)
(gimp-selection-border image radius)
(gimp-drawable-edit-fill drawable 0)
(gimp-selection-none image)
(gimp-displays-flush)
(gimp-context-pop)))
(script-fu-register "draw-an-ellipse"
"Draw Ellipse"
"Creates a hollow ellipse"
"Lorena"
"Copyright 2021, Lorena"
"30 May 2021"
""
SF-IMAGE "Image" 1
SF-DRAWABLE "Layer" 1
SF-VALUE "Perimeter Outline Radius" "5")
(script-fu-menu-register "draw-an-ellipse" "<Image>/Edit/Create")