这思路大佬们早就玩过了- (defun c:tt()
- (setq dcl_id (load_dialog "hdpsf.dcl"))
- (if (not (new_dialog "hdpsf" dcl_id))(exit))
- (setq kjkd(dimx_tile "tx") kjgd(dimy_tile "tx"))
- (setq kjkd1 kjkd kjgd1 kjgd ydx 0 ydy 0)
- (jjj-dcl-hdpcr "tx" "hdp")
- (action_Tile "+" "(jjj-dcl-hdpsf 1.2)")
- (action_Tile "-" "(jjj-dcl-hdpsf 0.8)")
- (action_Tile "s" "(jjj-dcl-hdpyd 0 -20)")
- (action_Tile "x" "(jjj-dcl-hdpyd 0 20)")
- (action_Tile "z" "(jjj-dcl-hdpyd -20 0)")
- (action_Tile "y" "(jjj-dcl-hdpyd 20 0)")
- (start_dialog)
- (unload_dialog dcl_id)
- )
- (defun jjj-dcl-hdpsf(xs /) ;幻灯片缩放
- (start_image "tx")
- (fill_image 0 0 kjkd kjgd -2)
- (setq ydx(+(/(- kjkd1(* kjkd1 xs))2)ydx) ydy(+(/(- kjgd1(* kjgd1 xs))2)ydy)
- kjkd1(* kjkd1 xs) kjgd1(* kjgd1 xs))
- (slide_image (fix ydx) (fix ydy) (fix kjkd1) (fix kjgd1) "hdp")
- (end_image)
- )
- (defun jjj-dcl-hdpyd(x y /) ;幻灯片移动
- (setq kjkd(dimx_tile "tx") kjgd(dimy_tile "tx"))
- (start_image "tx")
- (fill_image 0 0 kjkd kjgd -2)
- (setq ydx(+ x ydx) ydy(+ y ydy))
- (slide_image (fix ydx) (fix ydy) (fix kjkd1) (fix kjgd1) "hdp")
- (end_image)
- )
- (defun jjj-dcl-hdpcr(key_lst image_name /) ;幻灯片加载
- (start_image key_lst)
- (setq x(dimx_tile key_lst) y(dimy_tile key_lst))
- (fill_image 0 0 x y -2)
- (slide_image 0 0 x y image_name)
- (end_image)
- )
|