mirror of https://github.com/GNOME/gimp.git
Applied patch from BM which makes the script work layers that have their
2004-11-21 Kevin Cozens <kcozens@cvs.gimp.org> * plug-ins/script-fu/scripts/erase-rows.scm: Applied patch from BM which makes the script work layers that have their top-left corner at a position other than the top-left corner of the image. Fixes bug #158863.
This commit is contained in:
parent
bac40a781f
commit
168e96997e
|
@ -1,3 +1,10 @@
|
|||
2004-11-21 Kevin Cozens <kcozens@cvs.gimp.org>
|
||||
|
||||
* plug-ins/script-fu/scripts/erase-rows.scm: Applied patch from BM
|
||||
which makes the script work layers that have their top-left corner
|
||||
at a position other than the top-left corner of the image.
|
||||
Fixes bug #158863.
|
||||
|
||||
2004-11-21 DindinX <dindinx@gimp.org>
|
||||
|
||||
* plug-ins/gfig/gfig-arc.c
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
(define (script-fu-erase-rows img drawable orientation which type)
|
||||
(let* ((width (car (gimp-drawable-width drawable)))
|
||||
(height (car (gimp-drawable-height drawable))))
|
||||
(height (car (gimp-drawable-height drawable)))
|
||||
(position-x (car (gimp-drawable-offsets drawable)))
|
||||
(position-y (cadr (gimp-drawable-offsets drawable))))
|
||||
(gimp-image-undo-group-start img)
|
||||
(letrec ((loop (lambda (i max)
|
||||
(if (< i max)
|
||||
(begin
|
||||
(if (= orientation 0)
|
||||
(gimp-rect-select img 0 i width 1 CHANNEL-OP-REPLACE FALSE 0)
|
||||
(gimp-rect-select img i 0 1 height CHANNEL-OP-REPLACE FALSE 0))
|
||||
(gimp-rect-select img position-x (+ i position-y) width 1 CHANNEL-OP-REPLACE FALSE 0)
|
||||
(gimp-rect-select img (+ i position-x) position-y 1 height CHANNEL-OP-REPLACE FALSE 0))
|
||||
(if (= type 0)
|
||||
(gimp-edit-clear drawable)
|
||||
(gimp-edit-fill drawable BACKGROUND-FILL))
|
||||
|
|
Loading…
Reference in New Issue