- (DEFUN C:RECT4 ()
- (if (> (SETQ DCL_ID (LOAD_DIALOG "c:/RECT4.DCL")) 0) (progn
- (if (NEW_DIALOG "RECT4" DCL_ID) (progn
- (SET_TILE "rect_w" "50")
- (SET_TILE "rect_h" "20")
- (action_tile "accept" "(S_RECT)(done_dialog 1)")
- (action_tile "cancel" "(done_dialog 0)")
- (setq re (start_dialog))
- )
- (princ "\n无法显示对话框!")
- )
- (UNLOAD_DIALOG DCL_ID)
- )
- (princ "\n无法加载对话框!")
- )
- (if (= re 1) (progn
- (SETQ PT_0 (GETPOINT "\n 选择一个点 : "))
- (setq pt_2 (mapcar '+ (list tmp_w tmp_h)))
- ; (SETQ PT_1 (POLAR PT_0 0 TMP_W))
- ; (SETQ PT_2 (POLAR PT_1 (/ PI 2 ) TMP_H))
- ; (SETQ PT_3 (POLAR PT_2 PI TMP_W))
- ; (COMMAND "PLINE" PT_0 PT_1 PT_2 PT_3 "C")
- (command "_.RECTANG" PT_0 pt_2)
- ))
- (PRINC)
- )
- (DEFUN S_RECT ()
- (SETQ TMP_W (ABS (ATOF (GET_TILE "rect_w"))))
- (SETQ TMP_H (ABS (ATOF (GET_TILE "rect_h"))))
- )
|