on canvas

Put your problem here if it does not fit any of the other categories.

on canvas

Postby soniya » Mon Jan 14, 2008 3:35 pm

plz tel me

using canvas we draw 2 roundrect on screen and fill then roundrect to white color....
soniya
Senior Developer
Senior Developer
 
Posts: 111
Joined: Mon Jan 14, 2008 1:52 pm
Location: india

Top

Postby plusminus » Mon Jan 14, 2008 5:31 pm

Hello soniya,

I couldn't exactly get what you want, but this code should push you into the right direction.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 Bitmap outBitmap = Bitmap.createBitmap(100, 100, true);
  2.  
  3.                 Canvas c = new Canvas(outBitmap); // Drawings to "c" will result on "outBitmap"
  4.  
  5.                 Paint myPaint = new Paint();
  6.  
  7.                 c.drawRoundRect(new RectF(10,10,90,90), 5, 5, myPaint);
  8.  
  9.                 c.drawRoundRect(new RectF(15,15,85,85), 5, 5, myPaint);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Feel free to ask further questions :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby soniya » Tue Jan 15, 2008 12:06 pm

now i want use simple image on round rect using canvas...which method we will be used?
soniya
Senior Developer
Senior Developer
 
Posts: 111
Joined: Mon Jan 14, 2008 1:52 pm
Location: india

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 19 guests