These window coordinates are then used to zoom to area as below:
Finding range of selected objects can get trickier when there is single object selected like a line which is either horizontal or vertical. In case of a horizontal line, y-coordinates of the Lower-Left and Upper-Right corners become same and when translated to window or screen coordinates do not become acceptable for Zoom Area.
In such cases, it is necessary to check and if the coordinates are same, increment them slightly, say 10%, so that it forms a valid window for Zoom Area:
This concludes the programming part.
To download the source code and the program continue to Part 5...
No comments:
Post a Comment