J
jc_usernet
Hello.
I am trying to gain experience with Java graphics (Java(TM) SE Runtime
Environment (build 1.6.0_14-b08)) and using the class Graphics2D. I
performed a transformation on the axis (with a polarity reversal of
the Y axis), then wrote text to the graph. However it is displayed
upside down. The abbreviated Java syntax is:
Graphics2D g2d = ( Graphics2D ) g;
g2d.transform( new AffineTransform( 1, 0,
0, -1, 10, 390 ) );
// float m00, float m10, float m01,
float m11, float m02, float m12
// X'= 1*X +10 Y' =
-1*Y + 390
g2d.drawString( "Mary had a little lamb.", 330, 330);
g2d.drawLine(250,250,300,300);
My line is as expected and the text is how I would not like it (upside
down).
Are three any suggestion as to the best resolution?
Regards JC......
I am trying to gain experience with Java graphics (Java(TM) SE Runtime
Environment (build 1.6.0_14-b08)) and using the class Graphics2D. I
performed a transformation on the axis (with a polarity reversal of
the Y axis), then wrote text to the graph. However it is displayed
upside down. The abbreviated Java syntax is:
Graphics2D g2d = ( Graphics2D ) g;
g2d.transform( new AffineTransform( 1, 0,
0, -1, 10, 390 ) );
// float m00, float m10, float m01,
float m11, float m02, float m12
// X'= 1*X +10 Y' =
-1*Y + 390
g2d.drawString( "Mary had a little lamb.", 330, 330);
g2d.drawLine(250,250,300,300);
My line is as expected and the text is how I would not like it (upside
down).
Are three any suggestion as to the best resolution?
Regards JC......