Is there any way to draw lines in CGContext which connected with each other with 45 degree angle, like this picture shows:
Asked
Active
Viewed 151 times
0
-
No, you need to use two shapes/paths and fill them separately. – Mats Mar 26 '15 at 16:30
1 Answers
0
I don't think there is a simple way to do it. If there were, it would be one of the options you could pass to CGContextSetLineCap
, but it only supports Butt, Round, and Square.
What you would need to do is write a function that takes two end points, a direction (so you know which side to make smaller), and a color. Use this info to draw a filled-in trapezoid.

i_am_jorf
- 53,608
- 15
- 131
- 222