我已制定多条线路,我怎么开始和结束坐标? [英] I have drawn multiple lines, how do I get the beginning and ending coordinates?

查看:108
本文介绍了我已制定多条线路,我怎么开始和结束坐标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很大的可滚动的图像和我画的帆布使用多行。我想获得的起点和该特定线,这是由用户点击的结束坐标(x,y)的。我该怎么做?

I have large scrollable image and I am drawing multiple lines using canvas. I want to get the starting and ending coordinates (x,y) of that specific line, which is clicked by the user. How can I do that?

推荐答案

您应该存储坐标绘制,并检测与线碰撞。

You should store coordinates to draw and also detect collision with the lines.

这篇关于我已制定多条线路,我怎么开始和结束坐标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆