Does Quartz2D test intersection of rect by line before drawing it.
Posted
by ddnv
on Stack Overflow
See other posts from Stack Overflow
or by ddnv
Published on 2010-04-02T15:46:28Z
Indexed on
2010/04/02
17:13 UTC
Read the original article
Hit count: 217
I'm drawing a big scheme that consist of a lot of lines. I do it in the drawRect:
method of UIView
. The scheme is larger than the layer of view and I check each line and draw it only if it intersects the visible rect. But at one moment I thought, should I do this? Maybe Quartz is already doing this test?
So the question is:
When I use function CGContextAddLineToPoint()
does the Core Graphics
tests this line for intersection with layer rect or it just draw it anyway?
© Stack Overflow or respective owner