Hi !
I'm experiencing a strange phenomenon, maybe a bug.
Code:
public void render(GameContainer container, Graphics g){
g.drawLine(500, 0, 500,500);
}
=> OK : This code works. A vertical line is drawn as expected.
Code:
public void render(GameContainer container, Graphics g){
g.pushTransform();
g.scale(2f, 2f);
g.popTransform();
g.drawLine(500, 0, 500,500);
}
=> KO : This code doesn't look to work. The vertical line is not displayed which is unexpected. The code behave as if I had set the line width to .5.
Calling g.setLineWidth(2) bypass the issue. It looks like there is a trick made by scale(2f,2f) that is not roll-backed by popTransform. I tried to call g.resetLineWidth(), but is doesn't help at all: the lien is still not drawn.
This code draws a strong line.
Code:
public void render(GameContainer container, Graphics g){
g.pushTransform();
g.scale(.2f, .2f);
g.popTransform();
g.drawLine(500, 0, 500,500);
}
=> KO: A strong line is drawn rather than a normal line.
Is there a bypass ? Thanks for all !