查看单个帖子
旧 2009-05-07, 05:13 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】ransforming Te

transforming text
transforming text
if i am transforming a piece of text by
pent->transformby(transform); // where pent is a text entity, then if i have a scale factor in the transformation matrix, the text doesn't seem to be transformed correctly. other entities such as lines appear to work correctly however.
in the big picture, i am importing the attached dwg file into my software, by reading the xref it contains. i get the transformation matrix of the xref and apply it to each entity in the xref block to get the new coords of the transformed entities. all the text is way out, but only when i apply a scale to the xref (in this case of 5). if it were 1, the text is positioned correctly.
any ideas?
attached files
text entity can be transformed only by uniscaled-ortho matrix.
scale (5,5,5) is ok but (5,5,1) is not.
text is not the only entity which can't be transformed by any matrix. so the status returned from transformby() must be checked.
btw, gettransformedcopy() is less difficult to please with the matrix passed.
where may be entities which can't be transformed at all (custom ones for example)
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)