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

I am wondering what these methods do and how to use them, since in Javadocs there are no details beyond the description of one sentence:

setStrokeJoin

setStrokeMiter

Anyone have a sample code or a good description?

+6
source share
1 answer

setStrokeJoin allows setStrokeJoin to set three modes of how a line connecting thick lines is rendered. ROUND means that the circular segment is used to bypass the kink, BEVEL means that the other segment of the short striggia is used perpendicular to the half angle, and MITER means that the outer contour of the two connecting lines is extended until it crosses. However, when the angle is really sharp, this point can go very far, so a limit is usually set, which switches from MITER to BEVEL if a certain sharpness is achieved. This limit is controlled by setStrokeMiter . See examples here .

+12
source

Source: https://habr.com/ru/post/887081/


All Articles