![]() |
【转帖】linetype rendering 9simplification 0
linetype rendering (simplification ?)
linetype rendering (simplification ?) hi! i use the rendering framework (odgsbasevectorizeview, odgsbasevectorizedevice, etc.) to render the geometry in my home made viewer. why is it that when i render small linetypes, then get rendered as continuous lines. fff"> i attached 2 files. you can see 5 lines at the bottom. the linetype scales go from 0.08 (top line) to 0.04 (bottom line). line1.gif : a screenshot from autocad. line2.gif : a screenshot from my home made viewer. as you can see, the smaller linetypes are renderer as continuous lines. the polylineout() method only sends me 1 straight line. why is it happening ? it doesnt render like that in your examples (singledoc.exe, odmfcapp.exe, etc.). mat attached images hi mat, dd vectorization calls odgsview::linetypegenerationcriteria() to decide if linetype should be generated. dd generates ltp if total pattern length calculated in wcs >= ltp generation criteria. default implementation of linetypegenerationcriteria() returns value calculated from values passed into odgsview::setviewport() which defines target resolution. you probably should override odgsbasevectorizeview::linetypegenerationcriteria( ) to return 0.0 or other reasonable value... default dd implementation: code: double odgsbasevectorizeview::linetypegenerationcriteria() const { odgepoint2d pixelsperunit; getnumpixelsinunitsquare(odgepoint3d::korigin, pixelsperunit); pixelsperunit.x = fabs(pixelsperunit.x); pixelsperunit.y = fabs(pixelsperunit.y); double pixelsize = 1.0 / odmax(pixelsperunit.x, pixelsperunit.y); return 2.0 * pixelsize; } |
所有的时间均为北京时间。 现在的时间是 04:40 AM. |