[Biojava-l] leader and trailer in Renderers
Matthew Pocock
matthew_pocock@yahoo.co.uk
Mon, 04 Mar 2002 16:07:03 +0000
The leading and trailing space is requested per renderer. This is
because some glyphs (e.g. numbers) are scale-invarient and will be
clipped off if the rendering is clipped exactly. I think the container
of the sequence renderers loops over these and finds the maximum one.
Then, it individualy translates each sequence renderer so that their
sequence-based co-ordinates line up, but they are guaranteed a minimum
of leader and trailer padding. Does that help?
M
David Huen wrote:
> I've been going thru' the SequencePanel code to document it a bit more and
> I am puzzled over the intent behind the leader and trailer allocations in
> this code.
>
> If I understand the SequencePanel source correctly, each renderer tells
> SequencePanel thru' getMinimumLeader and getMinimumTrailer the number of
> pixels to set aside for these. SequencePanel uses these on a per-renderer
> basis to append the number of pixels before and after the space required
> to render the sequence and aligns the left edge against the right edge of
> the leading Border allocation.
>
> If this is the case, the moment we start allocating leaders and trailers
> (all renderers use sero so far), we might have sequence renderings out of
> kilter, wouldn't we? Shouldn't the allocation be per-panel rather
> per-renderer? If we use per-panel allocations, the renderers will need to
> recover from SequencePanel the actual leader/trailer allocations. Have I
> understood the code correctly?
>
> What was the original intent for these allocations? Labels?
>
> Thanks,
> David Huen
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>
>