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

different retrurn value from odgsbasevectorizeview::target()
different retrurn value from odgsbasevectorizeview::target() on the same drawing file
we are using dwgdirect 1.12.04 and adtdirect 0.5.2 as static libraries and by ms .net 2003 compiler.
for our display purpose, we use odgsbasevectorizeview::target() as an offset value to convert the coordinate points from vectorized result. what we find is that when opening the same drawing multiple times, each time will see the target() function returns the different odgepoint3d value (off by a small amount in x, y and z). the same problem happens on odgsbasevectorizeviewsition() as well.
two questions;
(1) do we not initialize something correctly to alter the return from target() and position()? how can we make it right?
(2) could someone tell us the purpose of position(), target() and upvector() in odgsbasevectorizeview class?
thanks,
wen
viewport alignment to integer screen coordinates is a limitation of gs interface -- odgsdevice:nsize() and odgsview::setviewport() take integers as parameters. then these values used for calculating objecttodevicematrix().
as a result if your application uses different integer values (different window size/aspect ratio for example) the transformation matrix may slightly differ.
in odamfcapp, for example, pan, zoom, rotate are performed by gsview - no changes are propagated to db objects (oddbviewport or oddbviewporttablerecord). to move the changes from gs view to db object view parameters need to be accessed somehow...
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)