Setting up Paint for drawing shapes
suggest changesetStyle(Paint.Style style)Filled shapeFILL, Stroke shapeSTROKE, or bothFILL_AND_STROKEsetColor(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 the miter join limit. This can prevent a miter join from going on indefinitely, turning it into a bevel join after x pixels. See this.setStrokeWidth(float width)Set the stroke width.0draws in hairline mode, independent of the canvas matrix (always 1 pixel).
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents