Hi all,
I expect drawRectangle to only draw the rectangles borders and fillRectangle to fill it.
However, when I use one or the other, I always get the filled rectangle.
Am I missing something? Do anyone reproduce ?
Hi all,
I expect drawRectangle to only draw the rectangles borders and fillRectangle to fill it.
However, when I use one or the other, I always get the filled rectangle.
Am I missing something? Do anyone reproduce ?
How big is the rectangle, and what do you have the pen width set to? What are your colors set to?
Rectangle 14x14, pen width 1, foreground white, background transparent
What device? Sim, real device, or both?
Very simple code with drawRectange and fillRectangle:
function onUpdate(dc) {
dc.setColor(Gfx.COLOR_BLACK,Gfx.COLOR_BLACK);
dc.clear();
dc.setColor(Gfx.COLOR_WHITE,Gfx.COLOR_TRANSPARENT);
dc.drawRectangle(50,50,14,14);
dc.fillRectangle(50,100,14,14);
}
And how it looks on a fr945 in the sim:
I found out why it happens: I use a negative width. (because I want my X and Y to be the coords of the top right corner)