![]() |
【转帖】measure distance on the screen
measure distance on the screen
measure distance on the screen hi, i'd like to extend my dwg-viewer with the ability to measure distances on the screen. how can i do that? m_pdevice->onsize(odgsdcrect(0, 1000, 1000, 0)); m_pdevice->update(); how do i know the distance betwenn the screen-points (0,0) and (100, 100)? i've found getmeasurement(), getinsunits(), objecttodevicematrix() and other, but i don't know how to use them. can anybody help? bye, holger. measure distance on the screen hi, i've found getworldstartendpoints in odamfcapp. it's a good sample for converting screen to wcs. for a well known line on screen i get a distance of 7,6 and it should be 7,6 m. but: getinsunits returns kunitsmillimeters! so what am i still missing? bye, holger. usually the modelspace units are logical units and not meters, inches, etc. insunits are used when inserting blocks from outer drawings, in order to match between the interpretation of the different units. so you can show your measures in units, or maintain your own variable for units. hope this helps. best regards chudomir |
所有的时间均为北京时间。 现在的时间是 06:16 AM. |