Grüß Gott,
wenn ich eine Linie zeichne (s. Beispiel), gibt es eine Möglichkeit, diese Linie mit einem Hover-Befehl zu belegen? Dass sie z.B. ihre Farbe ändert oder ähnliches?
Danke für jede Antwort!
Peter
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20,20);
ctx.lineTo(20,100);
ctx.lineTo(70,100);
ctx.strokeStyle="red";
ctx.stroke();
</script>
</body>
</html>