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

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

Well, the PrintingMaskedRenderRegion uses 1bpp rendering but I don't
think anything has really tested that.  You should be able to tell if
the actual mask bitmap is the correct way round using the defines, the
transparent objects should appear black in the mask.

It is also possible that the DrawMaskedBitmap function in whatever
render region is being used is using the mask inverted.


-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Alex Bligh
Sent: 15 June 2006 10:35
To: dev@xxxxxxxxxxxxxx
Cc: Alex Bligh
Subject: RE: [XaraXtreme-dev] Debugging View::RenderOptimalView -
request for assistance


Thanks for this. I am getting some output - I think there is a big
bitmap hiding stuff. It's almost as if the mask is inverted or


--On 15 June 2006 09:56 +0100 Gerry Iles <GerryI@xxxxxxxx> wrote:

> Oh yeah, there are also these two defines at the top of view.cpp
># ifdef _DEBUG
># endif
> If you define these then the bitmaps for each complex span will get
> added to the document and can be examined in the bitmap gallery (and
> dragged into the document etc).
> Gerry
> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx]
> Behalf Of Gerry Iles
> Sent: 15 June 2006 09:46
> To: dev@xxxxxxxxxxxxxx
> Subject: RE: [XaraXtreme-dev] Debugging View::RenderOptimalView -
> request for assistance
> If you are getting no transparent stuff output during RenderSimpleView
> then there must be something wrong.  What it should do is render all
> the document from the bottom up to the top most complex object into a
> bitmap and then render all the on top, non-complex stuff normally.
> where everything is non-complex then it just renders normally but if
> have one transparent object on the top then the whole document should
> render into a bitmap.
> When I was rewriting RenderOptimalView (and RenderSimpleView) to use
> RenderTree rather than the old tree scanning methods I found that the
> easiest way to debug it was to stick lots of trace in it (it should
> still be there) and print simple documents to a file using a normal PS
> driver and then use GhostScript to look at the results.  This could be
> single stepped as required.  Since you are doing EPS export then you
> should be able to do the same.
> If you look at DocView::ContinueRenderView you will see that when
> viewing a separation it uses RenderSimpleView.  You could just force
> this function to call RenderOptimalView all the time but I suspect the
> output would get a bit confusing for sensible debugging.  I seem to
> recall there were some problems using it on screen though it may have
> just been that it was too slow for decent on screen performance.  You
> will probably be better off simply single stepping through the
> RenderOptimalView code.
> There is a useful function called DumpNodeRuns in the
> ScanningRenderRegion that may tell you useful things (e.g. the
> ScanningRenderRegion isn't managing to actually create any node runs).
> Since chunks of the doc go missing I assume that there are node runs
> being generated.  RenderOptimalBitmapPhase gets called from the
> OptimalPrintRenderCallback class to render the complex node runs so
> some trace back in there too.
> The most likely problem is either in the creation of the bitmaps for
> complex spans or in the rendering of those bitmaps to the main render
> region.  There is a special function used to render the bitmaps using
> the mask (that is also generated) and I suspect that this function
> correct.
> Like I say, the easiest way is probably to create some simple docs
> just a few objects (e.g. rectangle, trans rectangle, rectangle) and
> what happens.
> Gerry
> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx]
> Behalf Of Alex Bligh
> Sent: 14 June 2006 20:46
> To: xara-dev
> Cc: Alex Bligh
> Subject: [XaraXtreme-dev] Debugging View::RenderOptimalView - request
> for assistance
> I am (attempting) to debug by EPS export stuff, which uses
> View::RenderOptimalView() to decide which bits to print as
> a bitmap and which to print as postscript. If I just use
> simple mode, I get an output, albeit one without transparency.
> Now I have reenabled thie OptimalView stuff I get far less
> output (but still clearly the right document).
> What is the best way to go about debugging this stuff? Is
> there (for instance) some secret-squirrel control to make
> the normal (displayed) view use OptimalView instead (i.e.
> render stuff into subsidiary bitmaps etc.)? Any hints?
> Alex