PDA

View Full Version : Some SCM script!



rescuede
25-02-2003, 17:45
<!--
define (script-fu-pacx-logo text-pattern
text
size
scale
font
mouse-over)

(let* ((img (car (gimp-image-new 256 256 RGB)))
(text-layer (car (gimp-text-fontname img -1 0 0 text 30 TRUE
size PIXELS font)))
(width (car (gimp-drawable-width text-layer)))
(height (car (gimp-drawable-height text-layer)))
(bg-layer (car (gimp-layer-new img width height RGB_IMAGE
"Background" 100 NORMAL)))
(pattern-layer (car (gimp-layer-new img width height
RGBA_IMAGE "Pattern" 100 NORMAL)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-undo-disable img)
(gimp-image-resize img width height 0 0)
(gimp-image-add-layer img pattern-layer 1)
(gimp-image-add-layer img bg-layer 2)
(gimp-palette-set-background '(255 255 255))
(gimp-edit-fill bg-layer BG-IMAGE-FILL)
(gimp-edit-clear pattern-layer)
(gimp-layer-set-preserve-trans text-layer TRUE)
(gimp-palette-set-foreground '(0 0 0))
(gimp-edit-fill text-layer FG-IMAGE-FILL)
(gimp-layer-set-preserve-trans text-layer FALSE)
(plug-in-gauss-iir RUN-NONINTERACTIVE img text-layer 3 TRUE TRUE)
; outline-blur-radius

(set! pattern-mask (car (gimp-layer-create-mask pattern-layer
ALPHA-MASK)))
(gimp-image-add-layer-mask img pattern-layer pattern-mask)

(gimp-selection-all img)
(gimp-edit-copy layer3)
(set! floating_sel (car (gimp-edit-paste pattern-mask 0)))
(gimp-floating-sel-anchor floating_sel)

(gimp-image-remove-layer-mask img pattern-layer APPLY)
(gimp-invert layer3)
(plug-in-gauss-iir RUN-NONINTERACTIVE img layer3 3 TRUE TRUE) ;
shadow-blur-radius

; Under Fucking windows, this doesn't wor; therefore, we have to save
manually.
; (gimp-file-save RUN-NONINTERACTIVE img flat-layer filename
"")
; (file-tiff-save RUN-NONINTERACTIVE img flat-layer
(string-prepend "c:\" filename) "" 0)
; (gimp-message filename)
(gimp-image-undo-enable img)
(gimp-display-new img)
))

(script-fu-register "script-fu-pacx-logo"

"<Toolbox>/Xtns/Script-Fu/Logos/PACX..."
"Creates PACX-MPI logos using 3D outline
Script FU"
", "tutor name "based on script by Hrvoje
Horvat"
" "tutor name "and Hrvoje
Horvat (hhorvat@open.hr)"

"21 February, 2003"
""
SF-PATTERN "Pattern" "Sky"
SF-STRING "Text"
"PACX-MPI"
SF-ADJUSTMENT _"Font Size (pixels)"
'(100 2 200 1 10 0 1)
SF-ADJUSTMENT _"Scale" '(0.30 0 1 .01
.01 2 0)
SF-FONT _"Font"
"-*-blippo-*-r-*-*-72-*-*-*-p-*-*-*"
SF-TOGGLE _"Button-Pressed" FALSE)

-->



OK tren day la vai dong code cua scm (not mine,but from my tutor)

Open source co diem loi la luc nao cung co the sua doi theo y minh thich ,tuy luc dau kho khan de ma su dung duoc.


Quan diem opensource tu lau da phat trien trong chau au roi,va may nuoc chau a phat trien da dan dan loai bo software cua Micro$oft.



BOi vay cung tuy nguoi thoi ,khong biet co ai trong nay biet nhieu ve schemes khong(SCM)