几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】how to generate a bitmap preview (http://www.dimcax.com/hust/showthread.php?t=16670)

yang686526 2009-05-06 02:38 PM

【转帖】how to generate a bitmap preview
 
how to generate a bitmap preview?
how to generate a bitmap preview?
hi
previously, i used the viewkit library to zoom my new drawing to its extents, then copy the dc into a bmp buffer, and then add the buffer as a bitmap thumbnail to the drawing.
i saw something about the exgsbitmapdevice header file but it all looks abit complex.
is it possible for someone to give me a bit of guidance on taking a database pointer object, setting it to the extents and giving it a bitmap preview image?
thanks.
andrew
look at
you need only to return exgsbitmapdevice in your system services inheritor from overridden gsbitmapdevice() function
sergey slezkin
i will look when i am ready....
but will it take care of setting the drawing to extents in order to do its bitmap ???
no. preview will be generated for current view (what you see immediately after opening drawing)
sergey slezkin
so, are you saying that i must:
a) ascertain extents of the drawing manually and
b) set these extents as the current view in the drawing
and thus it will automatically create and save a preview if possible?
i just need to understand the whole concept.
yes. but note that oddbviewport and oddbviewporttablerecord have zoomextents() method.
sergey slezkin
fantastic. i will see how i get on...


所有的时间均为北京时间。 现在的时间是 09:47 PM.