how to draw a line on the 2D screen with mouse
in the 2D screen, I want to draw a line. One point of the line is given, for example (400,500,0), the other point of the line is where the click of the mouse.
since the coordinate range of the mouse is [0,1], while the coordinate range of the point of the line is determinated by the resolution of the screen. How to make sure the other end of the line is the point where the mouse clicks? |
To get the coordinate in window pixels or screen pixels, use:
Code:
# Get mouse position in pixel coordinates |
All times are GMT -7. The time now is 06:16 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC