几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】rendered Images Appear Upside Down (http://www.dimcax.com/hust/showthread.php?t=18413)

yang686526 2009-05-07 02:53 PM

【转帖】rendered Images Appear Upside Down
 
rendered images appear upside down
rendered images appear upside down
i have taken the exgssimpledevice and exrenderer examples to render into an hbitmap using gdi. however, without (knowingly) applying any transformations, all of my images appear upside down. i found this rather unexpected - why doesn't the rendering pipeline perform the basic (x, device.height-y) transformation by default? what is the quickest way to push a transformation matrix to perform such a task?
it turns out the dwgdirect v1.10 rendering example has a typo. under the "initiating the vectorization process for a drawing" example, the following code segment appears:
-----
odgsdcrect screenrect(odgsdcpoint(0, 0), odgsdcpoint(100, 100)); pdevice->onsize(screenrect);
-----
instead, it should be:
-----
// the odgsdcrect is in the form of [<left, bottom>, <right, top>]
odgsdcrect screenrect(odgsdcpoint(0, 100), odgsdcpoint(100, 0)); pdevice->onsize(screenrect);
-----


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