几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】problems with line weight rendering (http://www.dimcax.com/hust/showthread.php?t=18225)

yang686526 2009-05-06 11:54 PM

【转帖】problems with line weight rendering
 
problems with line weight rendering
problems with line weight rendering
hi,
i have a problem with 1.09 dwgdirect libraries:
i have a simple gdi render device (win32) and i want display lines with
correct line weight.
with 1.08 libraries all works fine, but with new libraries the function
draw_line_weight returns an incorrect line pixel weight.
i have no control of internal variable m_lwtopixels of odgsbasedevice class,
in my code the value is always 1.0, while in dwgdirect examples is correct in
comparison the screen and device resolution.
how can i have a correct line weight value in setcurrtraits function?
what's happened between 1.08 and 1.09 libraries? are there some new
functions for the setup of resolution device?
thanks in advance.
nicola.
hi nicola,
are you storing pointer returned by setupactivelayoutviews() ? it returns wrapper of your device pointer passed in it. that wrapper handles screen resize and manage dependent values (e.g. lineweight & linetype scale and other ).


所有的时间均为北京时间。 现在的时间是 08:26 AM.