It does look ugly. Text is rendered by a) finding the bounding box of
the text b) painting a square of that size in the background color and
c) painting the text itself.

Oddly enough, I was looking at the exact point in the code just this
week where the problem lies:

double widthPad = 3;
double heightPad = 1;

double w = bounds.getWidth()*zoomfactor + widthPad;
double h = bounds.getHeight()*zoomfactor + heightPad;

these are clearly magic numbers (the blame lies with me...) and should
at least be made into parameters. The slight difficulty is that this
code is in the abstract base class for the AWT draw visitor. Some
refactoring required :)

gilleain

On Wed, Sep 8, 2010 at 8:33 PM, Egon Willighagen
<[email protected]> wrote:
> Hi Ian,
>
> On Wed, Sep 8, 2010 at 9:29 PM, Russell, Ian
> <[email protected]> wrote:
>> Here's a simple example.
>
> Yeah, that looks pretty ugly :)
>
> I think this might be related to this bug report by Konstantin:
>
> https://sourceforge.net/tracker/?func=detail&aid=3062137&group_id=20024&atid=120024
>
> Egon
>
> --
> Dr E.L. Willighagen
> Post-doc @ Uppsala University (only until 2010-09-30)
> Proteochemometrics / Bioclipse Group of Prof. Jarl Wikberg
> Homepage: http://egonw.github.com/
> LinkedIn: http://se.linkedin.com/in/egonw
> Blog: http://chem-bla-ics.blogspot.com/
> PubList: http://www.citeulike.org/user/egonw/tag/papers
>

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to