RSS/Atom feed Twitter
Site is read-only, email is disabled

Patch to Allow the erase every other row plugin to skip a different number of rows

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

Patch to Allow the erase every other row plugin to skip a different number of rows Philip Trickett (List) 19 Jan 00:31
Philip Trickett (List)
2006-01-19 00:31:48 UTC (over 18 years ago)

Patch to Allow the erase every other row plugin to skip a different number of rows

A patch is attached to allow the "Erase every other line" plugin to erase every n line, from 2 lines to 6 lines.

Patch is also in bugzilla: #327610

Philip Trickett

Patch Below: [phil@nori scripts]$ diff -uN erase-rows.orig erase-rows.scm --- erase-rows.orig 2006-01-18 22:39:05.000000000 +0000 +++ erase-rows.scm 2006-01-18 22:46:10.000000000 +0000 @@ -1,4 +1,4 @@
-(define (script-fu-erase-rows img drawable orientation which type) +(define (script-fu-erase-rows img drawable orientation which type skip) (let* ((width (car (gimp-drawable-width drawable))) (height (car (gimp-drawable-height drawable))) (position-x (car (gimp-drawable-offsets drawable))) @@ -13,7 +13,16 @@
(if (= type 0) (gimp-edit-clear drawable) (gimp-edit-fill drawable BACKGROUND-FILL)) - (loop (+ i 2) max))))))) + (if (= skip 0) + (loop (+ i 2) max)) + (if (= skip 1) + (loop (+ i 3) max)) + (if (= skip 2) + (loop (+ i 4) max)) + (if (= skip 3) + (loop (+ i 5) max)) + (if (= skip 4) + (loop (+ i 6) max))))))) (loop (if (= which 0)
0
1)
@@ -25,11 +34,11 @@
(gimp-displays-flush)))

(script-fu-register "script-fu-erase-rows" - _"_Erase every other Row..." + _"_Erase every n Row..." "Erase every other row/column with the background color" + "Federico Mena Quintero, Philip Trickett (adjusted)" "Federico Mena Quintero" - "Federico Mena Quintero" - "June 1997"
+ "June 1997, Jan 2006" "RGB* GRAY* INDEXED*" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0