[英]How to create CGRect from CGMutablePath
In order to use the CGRect
intersection function I need to create a second CGRect
from CGMutablePath
. 为了使用所述CGRect
相交功能我需要建立一个第二CGRect
从CGMutablePath
。 Is it possible? 可能吗?
let rect1 = CGRect(myPath) // not allowed
let intersectionRect = rect2.intersection(rect1)
目前尚不清楚您希望从路径中获得哪个矩形,但是您是否想要boundingBoxOfPath
呢?
let rect1 = myPath.boundingBoxOfPath
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.