zdqwy19 发表于 2023-11-25 17:18:38

幻灯片调整大小宜适应对话框

      幻灯片的尺寸不好调整大小,我们就换个思路。我们先做好幻灯片,然后通过幻灯片大小、左右上下位置来填充图片框。在此向xshrimp、Gu_xl两位表示感谢,程序照抄而已。



kozmosovia 发表于 2023-11-25 17:28:02

幻灯片核心不是大小,是绘图视口高宽比。制作前手动调整,或者用程序临时将窗口高宽比调整为适合image_tile的长宽比例再生成SLD

paulpipi 发表于 2023-11-25 17:50:53

值得学习,感谢分享

sowin 发表于 2023-11-25 22:09:27

感谢分享,值得学习

yoyoho 发表于 2023-11-26 22:08:06

学习了! 感谢分享!!!!

ljfdjjj 发表于 2023-11-28 08:00:18

这思路大佬们早就玩过了;P(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)
)

zhangcan0515 发表于 2024-4-9 21:10:52


感谢分享,值得学习

magicheno 发表于 2024-9-25 13:05:37

感谢大佬分享
页: [1]
查看完整版本: 幻灯片调整大小宜适应对话框