Position of graphic items is rounded


I have an IntroJucer component which defines a few graphics elements. I have a rounded rectangle:

    <ROUNDRECT pos="273.5 540.5 30 17" cornerSize="2" fill="solid: 808080" hasStroke="1"
               stroke="1, mitered, butt" strokeColour="solid: ff808080"/>

But in the code this becomes

g.drawRoundedRectangle (274.0f, 540.0f, 30.0f, 17.0f, 2.500f, 1.000f);

The coordinates are rounded to integer numbers. This is fine if you're filling the rounded rectangle, but, when drawing a stroke you have to shrink the rectangle by 0.5 pixels, otherwise the lines fall between two pixels and you get a 2px wide line with 50% transparency. On most displays, (the usual low resolution 96dpi kind) this just doesn't look good.


Yes, the old introjucer gui designer code is very old, and probably predates floating point rectangle coords!

Like I keep saying, the main reason for the inclusion of that tool in the introjucer is backwards-compatibility, or for quickly hacking a rough UI together which you might want to hand-tune later, please don't expect it to be a high-level design tool!

I see, thanks for the reply.

Just out of curiosity, I remember the screencast introducing the ProJucer from a while ago, which looked quite cool. Is it still in development?


Am hoping to have the resources to finish it at some point!