代码拉取完成,页面将自动刷新
iOS 绘图(CoreGraphics)
pod 'ImageCG'
If you prefer not to use either of the aforementioned dependency managers, you can integrate ImageCG into your project manually.
如果您不喜欢以上管理依赖库的方式,则可以手动将 ImageCG 集成到项目中。
let image = UIColor.red.icg.image(CGSize(width: 200, height: 100))
let color = myImage.icg.color
let newImage = myImage.icg.zoom(to: CGSize(width: 200, height: 100))
let newImage = myImage.icg.clip(in: CGRect(origin: .init(x: 10, y: 30), size: .init(width: 200, height: 300)))
let pdfPath: String = "read/to/path/my.pdf"
let images = UIImage.icg.readPDF(from: pdfPath, isJoin: false)
let myImage: UIImage = UIImage()
myImage.icg.savedPDF(to: NSHomeDirectory() + "saved/to/path/my.pdf")
let baseImage = UIImage(named: "BaseImageName")!
let logoImage = UIImage(named: "LogoImageName")!
let image = baseImage.icg.add(logoImage)
let colors = [UIColor.blue, UIColor.red, UIColor.yellow, ...]
let image = colors.icg.linearGradient(CGSize(width: 200, height: 100),
direction: .diagonally)
let colors = [UIColor.blue, UIColor.red, UIColor.yellow, ...]
let image = colors.icg.radialGradient(CGSize(width: 200, height: 100),
direction: .diagonally)
ImageCG is released under the MIT license. See LICENSE for details.
ImageCG 是在 MIT 许可下发布的,有关详情请查看该许可证。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。