Interacting with Canvas Rectangle

后端 未结 2 1110
猫巷女王i
猫巷女王i 2021-01-12 06:53

I have a canvas Element in my simple HTML page and it has few rectangles drawn using context.fillRect() method. I need to interact with these drawn rectangles.

2条回答
  •  情歌与酒
    2021-01-12 07:24

    I've written a few tutorials on getting making and moving selectable shapes on Canvas that should give you a good understand of what you need.

    The short answer is that you simply have to keep track of all of the things you want to select.

提交回复
热议问题