Hi everyone I need to draw with CGContext a circle like this ..
How is this possible?
Should I use an image within CGContext or is it possible to use only ctx.fillEllipse(in: rect)
?
For now I have made a simple white circle
private func drawCursor(inContext ctx: CGContext) {
ctx.saveGState()
let center = pointFrom(angle: currentAngle)
let rect = CGRect(x: center.x, y: center.y, width: cursorSize, height: cursorSize)
cursorColor.setFill()
ctx.setShadow(offset: CGSize(width: 0, height: 0), blur: 3, color: cursorShadowColor.cgColor)
ctx.fillEllipse(in: rect)
ctx.restoreGState()
}
Thank you all for the support