Programming/Android2010.07.09 00:35

public void onDraw(Canvas canvas){
     Paint Pnt = new Paint();
     canvas.drawColor(Color.WHITE);

     // 캡 모양 테스트
     Pnt.setColor(Color.BLUE);
     Pnt.setStrokeWidth(14);
     canvas.drawLine(10, 10, 200, 10, Pnt);
     Pnt.setStrokeCap(Paint.Cap.ROUND);
     canvas.drawLine(10, 30, 200, 30, Pnt);
     Pnt.setStrokeCap(Paint.Cap.SQUARE);
     canvas.drawLine(10, 50, 200, 50, Pnt);
    
     // 조인 모양 테스트
     Pnt.setColor(Color.BLACK);
     Pnt.setStrokeWidth(15);
     Pnt.setStyle(Paint.Style.STROKE);
     Pnt.setStrokeJoin(Paint.Join.MITER);
     canvas.drawRect(10, 80, 60, 130, Pnt);
     Pnt.setStrokeJoin(Paint.Join.BEVEL);
     canvas.drawRect(80, 80, 130, 130, Pnt);
     Pnt.setStrokeJoin(Paint.Join.ROUND);
     canvas.drawRect(150, 80, 200, 130, Pnt);
    
     // 스타일 테스트
     Pnt.setStrokeWidth(5);
     Pnt.setColor(Color.RED);
     Pnt.setStyle(Paint.Style.FILL);
     canvas.drawCircle(30, 180, 20, Pnt);
     Pnt.setStyle(Paint.Style.STROKE);
     canvas.drawCircle(80, 180, 20, Pnt);
     Pnt.setStyle(Paint.Style.FILL_AND_STROKE);
     canvas.drawCircle(130, 180, 20, Pnt);
     Pnt.setColor(Color.BLUE);
     canvas.drawCircle(180, 180, 20, Pnt);
     Pnt.setStyle(Paint.Style.FILL);
     Pnt.setColor(Color.RED);
     Pnt.setStyle(Paint.Style.STROKE);
     canvas.drawCircle(180, 180, 20, Pnt);
     }

출처 - 안드로이드 프로그래밍 정복

'Programming > Android' 카테고리의 다른 글

리스너  (0) 2010.08.02
Memo  (0) 2010.08.02
PaintTest  (3) 2010.07.09
레이아웃  (0) 2010.07.05
Posted by zzibong

댓글을 달아 주세요

  1. 우왕 안드로이드 개발 멋있네염

    2010.07.22 01:55 신고 [ ADDR : EDIT/ DEL : REPLY ]
  2. While the , http://www.moncleroutletespain.com/ moncler chaquetas?drivers, http://www.moncleroutletespain.com/ http://www.moncleroutletespain.com/? will have to be qualified pilots, the Federal Aviation Authority has recently opened up a new class of license for light-sport aircraft, which can be obtained easily, http://www.moncleroutletespain.com/ moncler.The successful test flight has turned so many myths into reality and it is expected that this breakthrough innovation would greatly change the world of personal mobility and travel will become becomes a hassle free integrated land air experience.What is more, around 40 people have got it booked for them. Many more seems to be willing to take the wings. US firm?s one of the valuable contribution in shape of flying car to serve the nations, http://www.moncleroutletespain.com/ moncler outlet. New technology moves the thinking of the advance category car user, http://www.moncleroutletespain.com/ moncler online, no doughty it increase the worth of modern technology as well as it become smart to serve the technology users, http://www.moncleroutletespain.com/ moncler españa.Related articles:


    http://tlotr.tistory.com/102 http://tlotr.tistory.com/102

    http://biz4net.tistory.com/234 http://biz4net.tistory.com/234

    2013.01.04 14:59 [ ADDR : EDIT/ DEL : REPLY ]
  3. Nicolas Sarkozy a rendu hommage vendredi à Philippe Séguin, http://www.moncleroutletespain.com/ http://www.moncleroutletespain.com/, décédé il y a tout juste un an, http://www.moncleroutletespain.com/ moncler chaquetas, "pupille de la Nation" devenu "un pilier de la République", http://www.moncleroutletespain.com/ moncler outlet, dans une lettre adressée à sa fille Catherine et lue par elle lors d'un colloque à l'Assemblée nationale, http://www.moncleroutletespain.com/ moncler online. Politique UMP: nomination de Morano aux élections validée à l'Elysée (cadre UMP) Politique Jacob soucieux du "respect du statut des fonctionnaires"Related articles:


    http://demyhan.tistory.com/415 http://demyhan.tistory.com/415

    http://urbannoise.tistory.com/38 http://urbannoise.tistory.com/38

    2013.01.05 20:58 [ ADDR : EDIT/ DEL : REPLY ]