Setting up Paint for drawing shapes
suggest changesetStyle(Paint.Style style)
Filled shapeFILL
, Stroke shapeSTROKE
, or bothFILL_AND_STROKE
setColor(int color)
Set the paint drawing color. You can also usesetARGB(int a, int r, int g, int b
andsetAlpha(int alpha)
setStrokeCap(Paint.Cap cap)
Set line caps, eitherROUND
,SQUARE
, orBUTT
(none) See this.setStrokeJoin(Paint.Join join)
Set line joins, eitherMITER
(pointy),ROUND
, orBEVEL
. See this.setStrokeMiter(float miter)
Set miter join limit. This can prevent miter join from going on indefinitively, turning it into a bevel join after x pixels. See this.setStrokeWidth(float width)
Set stroke width.0
will draw in hairline mode, independant of the canvas matrix. (always 1 pixel)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents