[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Debugging View::RenderOptimalView - request for assistance



Gerry,

I'm really stuck with this. What seems to happen is
that even with a single black rectangle, the scanning
system seems to think there is a complex shape. But
the TestMask mask bitmap is empty (i.e. all white),
hence it never gets as far as producing an optimal
bitmap to put on top as FindCoverage() returns
zero. I wouldn't expect a complex shape to be found
here at all.

The same thing happens with a more realistic
test (simple shape above complex shape above
simple shape). In that instance, I would expect
something to be drawn into the mask (the complex
shape, with a cutout for the simple shape above).
However, the mask is again blank. I would expect
MaskRenderRegion::SetNextShapeColour to be called
with Black as the parameter at least once, but
putting a breakpoint in and looking for black shows
it /is/ called once, but only when some capture
cache is flushed when it is rendering a bitmap.
This turns the local pBits entirely black (all
bits go to zero), but stepping back up to the
main render region stuff pBits again becomes
entirely white. I don't really understand what the
capture stuff is meant to do nor why it should be
active.

I have compared against the original windows source files
view.cpp, pmaskrgn.cpp, maskrr.cpp and can't see any
changes that should affect the code. I've also gone through
every EXCLUDE_FROM_XARALX, PORTNOTE and (for good measure)
comment with "GAT" in it that appears anywhere near anything
to do with export, masked render regions, EPS etc. and can't
find anything. I may well have missed something, I don't know.
I do know after 24 hours of staring at it I've not much
advanced.

Any ideas? Or any chance of taking a quick look? As soon
as it starts producing non-empty masks, I have a feeling
everything will work, or can be got to work reasonably
easily (it seems RGB order is corrupt on EPS export but
I can fix that I'd hope).

Alex