Skip to content

Instantly share code, notes, and snippets.

@agiletalk
Created April 27, 2011 05:14
Show Gist options
  • Select an option

  • Save agiletalk/943749 to your computer and use it in GitHub Desktop.

Select an option

Save agiletalk/943749 to your computer and use it in GitHub Desktop.
[예제] Canvas draw- 메서드
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