PDA

View Full Version : which unit for height paramter in drawview.rect()?


felixjo
12-15-2005, 09:54 AM
Hi,

I'm trying to draw a small graph from a datapointer like this:

dv.fillStyle = 0x0000ff;
while (mydp.isValid())
{
if (mydp.isValid())
{
Debug.write(mydp.getNodeName());
var height = mydp.getNodeText();
Debug.write(height);

dv.beginPath();
dv.rect((i-1)*20, 1, 15, height);

dv.fill();
dv.closePath();
}

i++;
xp = xps + i + xpe;
mydp.setXPath( xp );
}

For some reasons the values < 100 seem to be increased by 100 and the values > 100 get really big..

I'll attach a screenshot of the output (the values after 'comments' are used for the height).

felixjo
12-16-2005, 01:05 AM
Drawing the rectangle with negative height-values seems to work correctly.
I really wonder if I'm doing something wrong here or if this is the intended behavior... :-?