Gimp/plug-ins/script-fu/scripts/erase-rows.scm

38 lines
1.2 KiB
Scheme
Raw Normal View History

(define (script-fu-erase-rows img drawable orientation which type)
1997-11-24 14:05:25 -08:00
(let* ((width (car (gimp-drawable-width drawable)))
(height (car (gimp-drawable-height drawable))))
(gimp-undo-push-group-start img)
1997-11-24 14:05:25 -08:00
(letrec ((loop (lambda (i max)
(if (< i max)
(begin
(if (= orientation 0)
1997-11-24 14:05:25 -08:00
(gimp-rect-select img 0 i width 1 REPLACE FALSE 0)
(gimp-rect-select img i 0 1 height REPLACE FALSE 0))
(if (= type 0)
(gimp-edit-clear drawable)
(gimp-edit-fill drawable BG-IMAGE-FILL))
1997-11-24 14:05:25 -08:00
(loop (+ i 2) max))))))
(loop (if (= which 0)
1997-11-24 14:05:25 -08:00
0
1)
(if (= orientation 0)
1997-11-24 14:05:25 -08:00
height
width)))
(gimp-selection-none img)
(gimp-undo-push-group-end img)
1997-11-24 14:05:25 -08:00
(gimp-displays-flush)))
(script-fu-register "script-fu-erase-rows"
removed function gimp_menu_path_strip_uline() ... 2003-08-09 Henrik Brix Andersen <brix@gimp.org> * gimp/app/widgets/gimpwidgets-utils.[ch]: removed function gimp_menu_path_strip_uline() ... * gimp/libgimpbase/gimputils.[ch]: ... and added it here under the name gimp_strip_uline() * gimp/devel-docs/libgimpbase/libgimpbase-sections.txt: added gimp_strip_uline to gimputils section * gimp/app/plug-in/plug-in.c * gimp/app/widgets/gimpitemfactory.c * gimp/app/widgets/gimptoolbox. * gimp/app/gui/plug-in-menus.c: changed accordingly * gimp/plug-ins/script-fu/script-fu-scripts.c (script_fu_interface): use gimp_strip_uline() to strip mnemonics from script-fu menu paths * gimp/app/gui/vectors-menu.c * gimp/app/gui/templates-menu.c * gimp/app/gui/qmask-menu.c * gimp/app/gui/palettes-menu.c * gimp/app/gui/palette-editor-menu.c * gimp/app/gui/images-menu.c * gimp/app/gui/gradients-menu.c * gimp/app/gui/gradient-editor-menu.c * gimp/app/gui/documents-menu.c * gimp/app/gui/dialogs-menu.c * gimp/app/gui/colormap-editor-menu.c * gimp/app/gui/channels-menu.c * gimp/app/gui/buffers-menu.c * gimp/app/gui/brushes-menu.c * gimp/app/gui/layers-menu.c * gimp/plug-ins/pygimp/plug-ins/clothify.py * gimp/plug-ins/pygimp/plug-ins/shadow_bevel.py * gimp/plug-ins/pygimp/plug-ins/whirlpinch.py * gimp/plug-ins/pygimp/plug-ins/foggify.py * gimp/plug-ins/script-fu/scripts/*.scm * gimp/plug-ins/script-fu/script-fu.c: added mnemonics fixing more of bug #106991 * gimp/app/gui/error-console-menu.c (error_console_menu_update): updated menu item names, added mnemonics * gimp/plug-ins/common/animoptimize.c * gimp/plug-ins/common/animationplay.c: don't prepend every menu entry with "Animation"
2003-08-11 10:14:32 -07:00
_"<Image>/Script-Fu/Alchemy/_Erase every other Row..."
1997-11-24 14:05:25 -08:00
"Erase every other row/column with the background color"
"Federico Mena Quintero"
"Federico Mena Quintero"
"June 1997"
"RGB* GRAY* INDEXED*"
1997-11-24 14:05:25 -08:00
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-OPTION _"Rows/Cols" '(_"Rows" _"Columns")
SF-OPTION _"Even/Odd" '(_"Even" _"Odd")
SF-OPTION _"Erase/Fill" '(_"Erase" _"Fill with BG"))