Commit 168e9699 authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens
Browse files

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.
parent bac40a78
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
......
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment