接下来,在init方法中添加代码,将鼠标移动处理程序与事件关联起来,然后保存修改。
Next, add into the init method the code to link the mouse movement handler with the event and save all your changes. Your init method should look something like Listing 9.
只要一支手写笔,或者一只鼠标,用户就可以在画布上绘制图片,且这并不需要程序员来跟踪或处理任何事件。
Using a stylus, or alternately a mouse, users can draw on the canvas without the developer needing to directly deal with tracking events.
此事件的处理程序接收鼠标指针所在位置的列索引和行索引。
The handler for this event receives the column index and row index of the mouse pointer position.
应用推荐