Core Graphics: How to draw overlapped semi transparent rectangle without changing color of the common area
When two semi-transparent overlaps, the part in the middle will combines and blends into a darker color. Is there any way to draw rect as usual, but keep the overlapped part sam开发者_如何学JAVAe color and transparency as remaining part of the rect?
You could calculate the intersection with
rect = CGRectIntersection(bottomRect, topRect)
Then draw the bottomRect, then fill the calculated rect with the default solid background color and draw the topRect on top of it.
加载中,请稍侯......
精彩评论