(define (script-fu-ignatov-neon text font dlina vysota iconcolor) (gimp-context-set-foreground '(255 255 255)) (let* ( (dlinav (/ dlina 5) ) (vysotav (/ vysota 2.5) ) (imgdlina (+ dlina (* dlinav 2)) ) (imgvysota (+ vysota (* vysotav 2)) ) (theImage (car (gimp-image-new imgdlina imgvysota RGB) )) (layerfon (car (gimp-layer-new theImage imgdlina imgvysota 0 "fon" 100 NORMAL) ) ) (layerosnova (car (gimp-layer-new theImage imgdlina imgvysota 0 "osnova" 100 NORMAL) ) ) (layershadowout (car (gimp-layer-new theImage imgdlina imgvysota 0 "shadovout" 100 NORMAL) ) ) (layershadowin (car (gimp-layer-new theImage imgdlina imgvysota 0 "shadowin" 100 NORMAL) ) ) (layerblik (car (gimp-layer-new theImage imgdlina imgvysota 0 "blik" 100 NORMAL) ) ) (layerblikup (car (gimp-layer-new theImage imgdlina imgvysota 0 "blikup" 100 NORMAL) ) ) (layertext (car (gimp-layer-new theImage imgdlina imgvysota 0 "text" 100 NORMAL) ) ) (text-layer (car (gimp-text-fontname theImage -1 ( - ( / imgdlina 2) dlinav) ( - ( / imgvysota 2) ( / vysota 4)) text 1 TRUE ( / vysota 2) 0 font))) (layerkruzhok (car (gimp-layer-new theImage imgdlina imgvysota 0 "kruzhok" 100 NORMAL) ) ) ;(layerkruzhokotr (car (gimp-layer-new theImage imgdlina imgvysota 0 "kruzhokotr" 100 NORMAL) ) ) ) ;Создание и чистка необходимых слоёв (gimp-context-push) (gimp-image-undo-disable theImage) (gimp-layer-add-alpha layerfon ) (gimp-layer-add-alpha layerkruzhok ) ;(gimp-layer-add-alpha layerkruzhokotr ) (gimp-layer-add-alpha layerblikup ) (gimp-layer-add-alpha layerosnova ) (gimp-layer-add-alpha layershadowout ) (gimp-layer-add-alpha layershadowin ) (gimp-layer-add-alpha layerblik ) (gimp-layer-add-alpha layertext ) ;(gimp-layer-add-alpha layerokowki) (gimp-image-add-layer theImage layerfon 0) ;(gimp-image-add-layer theImage layerkruzhokotr 0) (gimp-image-add-layer theImage layerosnova 0) (gimp-image-add-layer theImage layerblik 0) (gimp-image-add-layer theImage layershadowout 0) (gimp-image-add-layer theImage layershadowin 0) (gimp-image-add-layer theImage layerblikup 0) (gimp-image-add-layer theImage layertext 0) (gimp-image-add-layer theImage layerkruzhok 0) ;(gimp-image-add-layer theImage layerokowki 0) (gimp-selection-all theImage) (gimp-edit-clear layerfon) (gimp-edit-clear layerosnova) (gimp-edit-clear layershadowout) (gimp-edit-clear layerkruzhok) ;(gimp-edit-clear layerkruzhokotr) (gimp-edit-clear layershadowin) (gimp-edit-clear layerblik) (gimp-edit-clear layerblikup) (gimp-edit-clear layertext) (gimp-selection-none theImage) ;Рисование основы (gimp-round-rect-select theImage dlinav vysotav dlina vysota 10 10 0 FALSE FALSE 0 0) (gimp-selection-shrink theImage 1) (gimp-selection-invert theImage) (gimp-context-set-foreground '(255 255 255)) (gimp-edit-fill layerblik 0) (gimp-selection-invert theImage) (gimp-selection-grow theImage 1) (gimp-selection-invert theImage) (gimp-edit-clear layerblik) (plug-in-gauss TRUE theImage layerblik 5 5 0) (gimp-selection-feather theImage 20) (gimp-context-set-foreground iconcolor) (gimp-edit-fill layershadowout 0) (gimp-selection-invert theImage) (gimp-selection-grow theImage 5) (gimp-selection-invert theImage) (gimp-edit-clear layershadowout) (gimp-layer-set-opacity layershadowout 60) (gimp-selection-invert theImage) (gimp-selection-shrink theImage 5) (gimp-edit-fill layershadowin 0) (gimp-selection-shrink theImage 5) (gimp-edit-clear layershadowin) (gimp-layer-set-opacity layershadowout 75) (gimp-selection-grow theImage 5) (gimp-context-set-gradient "Основной в прозрачный") (gimp-edit-blend layerosnova CUSTOM-MODE NORMAL-MODE GRADIENT-LINEAR ; gradient type 100 ; opacity 0 ; offset REPEAT-NONE ; repeat FALSE ; reverse FALSE ; supersampling 0 0 ; FALSE ; dithering ( / imgdlina 2) ( + ( / imgvysota 2) ( / vysota 2)) ; x1 y1 ( / imgdlina 2) ; x2 ( - ( / imgvysota 2) ( / vysota 2)) ; y2 ) (gimp-selection-none theImage) (gimp-round-rect-select theImage ( + dlinav 1) ( + vysotav 1) ( - dlina 2) ( - vysota 2) 10 10 0 FALSE FALSE 0 0) (gimp-ellipse-select theImage ( / dlinav 2) ( / imgvysota 2) ( + dlina dlinav) vysota 1 1 0 0 ) ; (gimp-context-set-foreground "white") (gimp-context-set-gradient "Основной в прозрачный") (gimp-edit-blend layerblikup CUSTOM-MODE NORMAL-MODE GRADIENT-LINEAR ; gradient type 100 ; opacity 0 ; offset REPEAT-NONE ; repeat FALSE ; reverse FALSE ; supersampling 0 0 ; FALSE ; dithering ( / imgdlina 2) ( - ( / imgvysota 2) ( / vysota 2)) ; x1 y1 ( / imgdlina 2) ; x2 ( + ( / imgvysota 2) ( / vysota 2)) ; y2 ) (gimp-layer-set-opacity layerblikup 15 ) (gimp-selection-none theImage) (gimp-text-fontname theImage layertext ( - ( / imgdlina 2) dlinav) ( - ( / imgvysota 2) ( / vysota 4)) text 1 TRUE ( / vysota 2) 0 font) ;(gimp-floating-sel-anchor floating-sel) (gimp-round-rect-select theImage dlinav vysotav dlina vysota 10 10 0 FALSE FALSE 0 0) (gimp-context-set-default-colors) (gimp-edit-blend layerosnova CUSTOM-MODE NORMAL-MODE GRADIENT-LINEAR ; gradient type 100 ; opacity 0 ; offset REPEAT-NONE ; repeat FALSE ; reverse FALSE ; supersampling 0 0 ; FALSE ; dithering ( / imgdlina 2) ( - ( / imgvysota 2) ( / vysota 2)) ; x1 y1 ( / imgdlina 2) ; x2 ( + ( / imgvysota 2) ( / vysota 2)) ; y2 ) (gimp-drawable-transform-flip-simple text-layer 1 FALSE ( + (/ imgvysota 2) ( / vysota 4)) FALSE) (gimp-ellipse-select theImage ( * dlinav 1.2) ( - ( / imgvysota 2) ( / vysota 6)) ( / vysota 3) ( / vysota 3) 2 1 1 10 ) (gimp-context-set-foreground "white") (gimp-edit-fill layerkruzhok 0) ;(gimp-edit-fill layerkruzhokotr 0) (gimp-selection-none theImage) ;(gimp-drawable-transform-flip-simple layerkruzhokotr 1 FALSE ( + (/ imgvysota 2) ( / vysota 6)) FALSE) (gimp-rect-select theImage (* dlinav 2) ( - ( / imgvysota 2) ( / vysota 4)) 1 ( - ( / imgvysota 2) ( / vysota 2.8)) 0 FALSE 0) (gimp-context-set-foreground "white") (gimp-edit-fill layerkruzhok 0) (gimp-selection-none theImage) (gimp-rect-select theImage ( + (* dlinav 2) 1) ( - ( / imgvysota 2) ( / vysota 4)) 1 ( - ( / imgvysota 2) ( / vysota 2.8)) 0 FALSE 0) (gimp-context-set-foreground "black") (gimp-edit-fill layerkruzhok 0) (gimp-selection-none theImage) (gimp-image-clean-all theImage) (gimp-image-undo-enable theImage) (gimp-display-new theImage) (gimp-context-pop) ) ) (script-fu-register "script-fu-ignatov-neon" _"Неоновая кнопка..." "Создаёт кнопку с неоновым блеском" "ПРИВЕТ" "www.linformatika.ru" "Май 2010" "" SF-STRING _"Текст" "ПРИВЕТ" SF-FONT _"Шрифт" "Sans" SF-ADJUSTMENT "Длина кнопки (точек)" '(300 120 2000 1 10 0 1) SF-ADJUSTMENT "Высота кнопки (точек)" '(100 40 2000 1 10 0 1) SF-COLOR "Цвет кнопки" '(0 194 184) ) (script-fu-menu-register "script-fu-ignatov-neon" _"/File/New/linformatika/Кнопки")