最近碰到一个需求: 在一个View中划取四边形,四边形可以是不规则的。然后在这个四边形内填充一张指定的图片。图片根据四边形边界自动进行拉伸填充,而不是裁剪。
选择区域还好说,但如何在一个不规则的四边形中填充一张图片呢?求解决方案……
加一张效果图吧:
就是类似这种空间透视的效果。 四边形的形状是不确定的。
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Has been solved using AGGeometryKit framework
If you don’t crop it, wouldn’t this picture be deformed?
CAShaperLayer --layer.content = UIImage.CGImage Draw the image yourself, I don’t know if it is possible
First lay it out normally, like a waterfall flow. Then add the 3D effect.
Has been solved using AGGeometryKit framework
If you don’t crop it, wouldn’t this picture be deformed?
CAShaperLayer --layer.content = UIImage.CGImage Draw the image yourself, I don’t know if it is possible
First lay it out normally, like a waterfall flow. Then add the 3D effect.