Rachid
07/03/2020, 8:46 AMonClick
and onOver
doesn't work?
// clicking DOES work
val cicleStroke = graphics {
stroke(
ColorPaint(Colors.RED),
Context2d.StrokeInfo(thickness = 1.0)
) {
circle(0.0, 0.0, 40.0)
}
}.xy(100.0, 100.0)
cicleStroke.onClick {
println("Clicked cicleStroke")
}
// clicking does NOT work
val circleFilled = graphics {
fillStroke(
ColorPaint(Colors.LAWNGREEN),
ColorPaint(Colors.BLACK),
Context2d.StrokeInfo(thickness = 1.0 )
) {
circle(0.0, 0.0, 30.0)
}
}.xy(200.0, 100.0)
circleFilled.onClick {
println("Clicked circleFilled")
}
Nico
07/03/2020, 9:14 AMbeginFillStroke
does not return Graphics
.Deactivated User
07/03/2020, 9:19 AMNico
07/03/2020, 9:20 AMdirty
flag is doing but the dirty
function returns Graphics
on all the other drawing calls. Its only missing hereRachid
07/03/2020, 9:21 AMbeginFillStroke
in my example?Deactivated User
07/03/2020, 9:22 AMNico
07/03/2020, 9:23 AMDeactivated User
07/03/2020, 9:23 AMRachid
07/03/2020, 9:32 AMNico
07/03/2020, 9:33 AMval circle = circle().onClick { println("I am a circle") }
Rachid
07/03/2020, 9:48 AM