高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】1.13.02 - 2.3.0 odgsbasevectorizeviewupdate90 not calle
1.13.02 -> 2.3.0 : odgsbasevectorizeview::update() not calle
1.13.02 -> 2.3.0 : odgsbasevectorizeview::update() not called
hi,
<important : see note below>
my 3d application imports files using the dwgdirect for c++. it's very simple and almost fully based on the odvectorizeex sample. i have just upgraded from 1.13.02 to 2.3.0, mostly because of switching to vs8. now however, the code is broken. the virtual update() method inherited in my view implementation is never called. i can see the view being created as a result of the setupactivelayoutviews() call in my odgslayouthelper by setting a breakpoint in the createview() method. then i call the odgslayouthelper::update() method, and nothing happens...
.. hints anyone? there are no exceptions, error messages etc... and i have scanned for changes between the 1.13.02 and the 2.3.0 example codes but i just don't know where to look any more.. i know that databases read allright to some extent - i can at least enumerate the layers (as you can see in my code..) ..
i have attached my odimporter implementation. the only thing that's really different from the example code is that my exgssimpledevice inherits both odgsbasevectorizedevice and odgigeometrysimplifier because that worked fine at least in 1.13.02, .. i can't see a reason why that should break it now either.
<edit: ooopps..>
ok, as a desperate last attempt i added the
odgsdcrect screenrect(odgsdcpoint(0, 0), odgsdcpoint(1000, 1000));
phelper->onsize(screenrect);
lines from the example code, and things are seeming back to something that works..
a bug? i don't use the screen rectangle at all, .. will there be a catch with adding this - will it affect anything at all for me??
regards,
lars wernlund
attached files
hi,
no, it's not a bug.
in 1.14 initialization of screen output rectangle was changed from (0,1,0,1) to (0,0,0,0). and odgsbasevectorizedevice::update() skips views with uninitialized viewport rectangle.
if you vectorizer does not need screenmatrix(), you may add initialization of screen rectangle in a constructor of derivative of odgsbasevectorizedevice to have screen rectangle automatically initialized during update() call.
|