skip to Main Content

Why draw(in: CGRect) draws border around ellipse when it should not? – Ios swift

This is my simple function I use for drawing an image in context: let renderer=UIGraphicsImageRenderer(size: CGSize(width: 330, height: 330)) let img=renderer.image{ ctx in let circle=CGRect(x:0,y:0,width: 330, height: 330) ctx.cgContext.setFillColor(UIColor.white.cgColor) ctx.cgContext.addEllipse(in: circle) ctx.cgContext.drawPath(using: .fill) let image = UIImage(named: "1")! image.draw(in: CGRect(x:…

VIEW QUESTION
Back To Top
Search