1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-19 08:57:35 +03:00

Node with gradient fill touch events fix

This commit is contained in:
Viktor Sukochev 2017-04-14 18:09:23 +07:00
parent ad312e0e51
commit df20a3be85

View File

@ -32,8 +32,14 @@ class ShapeRenderer: NodeRenderer {
var drawingMode: CGPathDrawingMode? = nil
if let stroke = shape.stroke, let fill = shape.fill {
setStrokeAttributes(stroke, ctx: ctx)
if let _ = fill as? Gradient {
setFill(Color.black, ctx: ctx, opacity: 1.0)
drawingMode = .fill
} else {
setFill(fill, ctx: ctx, opacity: 1.0)
drawingMode = .fillStroke
}
} else if let stroke = shape.stroke {
setStrokeAttributes(stroke, ctx: ctx)
drawingMode = .stroke