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:
parent
ad312e0e51
commit
df20a3be85
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user