mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 04:22:29 +00:00
f36a63f68c
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"
38 lines
1.2 KiB
Scheme
38 lines
1.2 KiB
Scheme
(define (script-fu-erase-rows img drawable orientation which type)
|
|
(let* ((width (car (gimp-drawable-width drawable)))
|
|
(height (car (gimp-drawable-height drawable))))
|
|
(gimp-undo-push-group-start img)
|
|
(letrec ((loop (lambda (i max)
|
|
(if (< i max)
|
|
(begin
|
|
(if (= orientation 0)
|
|
(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))
|
|
(loop (+ i 2) max))))))
|
|
(loop (if (= which 0)
|
|
0
|
|
1)
|
|
(if (= orientation 0)
|
|
height
|
|
width)))
|
|
(gimp-selection-none img)
|
|
(gimp-undo-push-group-end img)
|
|
(gimp-displays-flush)))
|
|
|
|
(script-fu-register "script-fu-erase-rows"
|
|
_"<Image>/Script-Fu/Alchemy/_Erase every other Row..."
|
|
"Erase every other row/column with the background color"
|
|
"Federico Mena Quintero"
|
|
"Federico Mena Quintero"
|
|
"June 1997"
|
|
"RGB* GRAY* INDEXED*"
|
|
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"))
|
|
|