[英]swift: Combine non-overlapping images
Every similar question I've seen relates to merging UIImage
s by placing one image on top of the other. 我所见过的每个类似问题都与通过将一个图像放在另一个图像上来合并
UIImage
有关。 Instead, I'd like the images to be adjacent to each other. 相反,我希望这些图像彼此相邻 。 I have a rectangle image and a triangle image and I'd like to make a new image with the square on top and the triangle beneath it.
我有一个矩形图像和一个三角形图像,我想制作一个新图像,其顶部为正方形,下方为三角形。
--------
| |
| |
--------
PLUS 加
--
\/
EQUALS 等于
--------
| |
| |
--- ---
\/
I don't want : 我不要 :
--------
| -- |
| \/ |
--------
因此,创建一个合并图像大小的图像上下文,并使用drawInRect将图像渲染到其中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.