练习:渲染小工具

rollout rendertool "渲染工具" width:193 height:300
(
    GroupBox grp2 "RenderTool" pos:[8,8] width:176 height:248
    button btnSave "Save" pos:[16,32] width:64 height:24
    dropdownList BitmapType "" pos:[88,32] width:88 height:22 items:#(".jpg", ".tga", ".png", ".tif")
    label lbl6 "Width" pos:[24,72] width:40 height:16    
    
    label lbl7 "Height" pos:[24,96] width:40 height:16
    spinner spnWidth "" pos:[88,72] width:88 height:16 range:[0,100000,640] type:#integer
    
    spinner spnHeight "" pos:[88,96] width:88 height:16 range:[0,100000,480] type:#integer
    button btnRender "Render" pos:[24,128] width:141 height:24
        
    on btnSave pressed do
        (getFullpath=getSavepath())--保存路径
        
    on spnWidth changed val do
        (spnWidth.value=val)
    on spnHeight changed val do
        (spnHeight.value=val)
    on btnRender pressed  do 
        (
            savePath=(Getfullpath+"\\"+$.name+BitmapType.selected)--(getFullpath+"\\"+"a"+BitmapType.selected)
            rending=render outputwidth:spnWidth.value outputheight:spnHeight.value outputfile:savepath
            save rending
            close rending
        )
                
)
createdialog rendertool

 

转载于:https://www.cnblogs.com/amixc/p/4014097.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值