Closed boronhub closed 4 years ago
@KarthikRIyer any idea how to fix the QuartzRenderer error ?
@boronhub comment out the Quartz Renderer tests if you're not using an Apple device.
You'll need to implement the function in QuartzRenderer too. This is because QuartzRenderer needs to conform to the Renderer protocol. You'll be able to do this only if you are on a mac. If not, could you allow edits from maintainer option in your PR. Then I can add the relevant code to fix the build.
Done!
I don't have ready access to a mac (I did have one an hour ago). So I'll add the code as soon as I get my hands on a mac.
I think this should work:
public func drawSolidEllipse(center c: Point,
radius rx: Float,
radius ry: Float,
fillColor: Color) {
let ellipse = CGMutablePath()
ellipse.addEllipse(in: CGRect(x: CGFloat(c.x-rx), y: CGFloat(c.y-ry), width: CGFloat(rx*2), height: CGFloat(ry*2)),
transform: CGAffineTransform(translationX: CGFloat(xOffset), y: CGFloat(yOffset)))
context.setFillColor(fillColor.cgColor)
context.addPath(ellipse)
context.fillPath()
}
Commits + fixes pushed by @KarthikRIyer through #111
Added function to draw solid ellipses in AGGRenderer and SVGRenderer.