fill & stroke at the same time with different color ?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

fill & stroke at the same time with different color ?

Postby MickArea » Fri Mar 13, 2009 9:04 pm

Hi, i would like to know if it exist a way to fill a path with a different color from the fill ?

because i know only that :
paint.setStyle(Paint.Style.FILL_AND_STROKE);
but it is the same color ...
MickArea
Junior Developer
Junior Developer
 
Posts: 23
Joined: Mon Feb 23, 2009 4:42 pm

Top

Postby MickArea » Sat Mar 14, 2009 10:55 am

well, I solved the problem, but i'm sad to see that i have to use this trick ...


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2.                                         paint.setStyle(Paint.Style.FILL);
  3.  
  4.                                         paint.setColor(Color.BLACK);
  5.  
  6.                                         canvas.drawPath(path, paint);
  7.  
  8.  
  9.  
  10.                                         paint.setStyle(Paint.Style.STROKE);
  11.  
  12.                                         paint.setColor(Color.BLUE);
  13.  
  14.                                         canvas.drawPath(path, paint);
  15.  
  16.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
MickArea
Junior Developer
Junior Developer
 
Posts: 23
Joined: Mon Feb 23, 2009 4:42 pm

Postby MrSnowflake » Sat Mar 14, 2009 11:20 am

That probably is the way to go and not a trick.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests