java – Using Paint.setStrokeJoin() and Paint.setStrokeMiter()-ThrowExceptions

Exception or error:

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:



Anybody have some example code or a good description?

How to solve:

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

Leave a Reply

Your email address will not be published. Required fields are marked *