[Biojava-l] LayeredRenderer clipping bug

Thomas Down td2@sanger.ac.uk
Fri, 14 Sep 2001 15:51:01 +0100


On Fri, Sep 14, 2001 at 03:34:22PM +0100, Keith James wrote:
> 
> The sequence rendering system appears to be cutting off the last 1+
> bases and associated features from the display. I've tracked this down
> (I think) to LayeredRenderer which appears to be clipping too
> enthusiastically because its boundary calculation is slightly off.
> 
> I think the problem is in the paint method, somewhere near
> 
> clip.setFrame(minP, 0.0, maxP - minP, depth)
> 
> If I fudge in an extra few pixels of width here, then the missing
> stuff reappears.

I'd actually be more inclined to suspect that it's the Symbol
and FeatureBlock renderers which are being over-zealous about
clipping -- at a quick inspection, LayeredRenderer just seems
to preserve the same width of clip which it inherits.  Or have
you tried using SymbolSequenceRenderer both inside a LayeredRenderer
and on its own?

> As everything is channelled through this renderer plus I've no idea
> what this class actually does, I'm giving some warning here.
> 
> I *will* hack with this if nobody else gets there first... ;)

Go for it!

   Thomas.