Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Paint.setStrokeJoin() and Paint.setStrokeMiter()

I'm curious about what these methods do and how to use them as there doesnt seem to be any details beyond the single sentence descriptions in the Javadocs:

setStrokeJoin

setStrokeMiter

Anybody have some example code or a good description?

like image 536
Nick Avatar asked May 02 '11 00:05

Nick


1 Answers

setStrokeJoin allows to set three modes how a line join of thick lines is rendered. ROUND means a circular section is used to go around the kink, BEVEL means another short straigt segment is used perpendicular to the halve angle, and MITER means the outer contour of the two joining lines is elongated until it intersects. However, when the angle is really sharp, that point can go very far away, so usually a limit is set that switches from MITER to BEVEL, if certain sharpness is reached. This limit is controlled by setStrokeMiter.

enter image description here

like image 133
dronus Avatar answered Sep 21 '22 01:09

dronus