Paint.setColor
is expecting an integer. But what I have is a Color
object. I don\'t see a color.getIntValue()
in Java? So how do I do
If you are developing for Android, Color's method for this is rgb(int, int, int)
So you would do something like
myPaint.setColor(Color.rgb(int, int, int));
For retrieving the individual color values you can use the methods for doing so:
Color.red(int color)
Color.blue(int color)
Color.green(int color)
Refer to this document for more info
Try this one:
Color color = new Color (10,10,10)
myPaint.setColor(color.getRGB());