马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- (defun XD::Table:SetRowHeight (tb height row / box box1 ents ents2 ents3 h i
- mat rows typ v
- )
- (setq typ (XD::Table:TYPE tb))
- (cond
- ((= typ "X")
- (setq rows (XD::Table:numRows tb))
- (cond
- ((= (type row) 'INT)
- (if (and
- (>= row 0)
- (< row rows)
- )
- (progn
- (setq h (XD::Table:RowHeight tb row)
- v (list 0 (- h height) 0.0)
- )
- (setq ents (XD::Table:getentbyrow tb row row)
- ents2 (cadr ents)
- )
- (if (not ents2)
- (setq ents3 (car ents))
- (setq ents3 ents2)
- )
- (setq box (xdrx_entity_box ents3 (XD::Table:direction tb))
- box1 (apply
- 'xdrx_points_offset
- (cons (/ h 5.0) box)
- )
- )
- (if ents2
- (progn
- (setq ents (XD::Table:getentbyrow tb row rows))
- )
- (progn
- (setq mat (xdrx_matrix_identity 3)
- mat (xdrx_matrix_settranslation mat (list 0
- (-
- (/ h
- 2.0
- )
- ) 0.0
- )
- )
- box1 (xdrx_points_transform box1 mat)
- )
- )
- )
- (xdrx_entity_stretch (append
- (car ents)
- (last ents)
- ) box1 v
- )
- )
- )
- )
- (t
- (setq i 0)
- (repeat rows
- (XD::Table:setrowheight tb height i)
- (setq i (1+ i))
- )
- )
- )
- (xdrx_object_regen tb)
- )
- ((= typ "A")
- (cond
- ((= (type row) 'INT)
- (xdrx_table_setRowHeight tb row height)
- )
- (t
- (xdrx_table_setRowHeight tb height)
- )
- )
- (xdrx_object_regen tb)
- )
- ((= typ "E")
- (cond
- ((= (type row) 'INT)
- (xdex_sheet_setRowHeight row height)
- )
- (t
- (xdex_sheet_setRowHeight height)
- )
- )
- )
- )
- )
|