Draw a cross centred at hovering mouse position over a TouchArea #4867
Unanswered
algorithmx
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I believe you should just be able to divide the length by 1px and it will convert it to an int. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Here is a quickly thrown together example. This draws the path within it's viewbox and then just moves the path around based on the mouse position |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear experts,
I wish to draw lines with respect to the mouse cursor position. The simplest example would be, to draw a cross centred at the hovering mouse position, accessed via "mouse-x" and "mouse-y". But if I draw the line using "Path", the type of point coordinates there should be int or float. I cannot use "mouse-x" and "mouse-y" because their types are length. How can I use them correctly? I cannot proceed on the experiment because this, so I don't even know whether it is possible to draw lines in the way I have chosen.
Thanks in advance for any hints and replies! :-D
Beta Was this translation helpful? Give feedback.
All reactions