Created
April 27, 2011 05:14
-
-
Save agiletalk/943749 to your computer and use it in GitHub Desktop.
[예제] Canvas draw- 메서드
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 onDraw(Canvas canvas) { | |
| Paint Pnt = new Paint(); | |
| canvas.drawColor(Color.WHITE); | |
| canvas.drawPoint(10, 10, Pnt); | |
| Pnt.setColor(Color.BLUE); | |
| canvas.drawLine(20, 10, 200, 50, Pnt); | |
| Pnt.setColor(Color.RED); | |
| canvas.drawCircle(100, 90, 50, Pnt); | |
| Pnt.setColor(0x800000ff); | |
| canvas.drawRect(10,100,200,170,Pnt); | |
| Pnt.setColor(Color.BLACK); | |
| canvas.drawText("Canvas Text Out", 10, 200, Pnt); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment