Created
February 25, 2015 12:40
-
-
Save codenameone/083b1b57e99ab7454cc7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void paint(Graphics g) { | |
g.setColor(0x0000ff); | |
g.rotate( | |
(float)(Math.PI/4.0), | |
getAbsoluteX()+getWidth()/2, | |
getAbsoluteY()+getHeight()/2 | |
); | |
g.drawRect(getX() + 5, getY() + 5, getWidth() - 10, getHeight() - 10); | |
g.rotate( | |
-(float)(Math.PI/4.0), | |
getAbsoluteX()+getWidth()/2, | |
getAbsoluteY()+getHeight()/2 | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment