Wednesday, April 9, 2008

Suceeded to make 2D rectangle drawing

The 2D drawing tool allows drawing with snap (if the grids are enabled) or free drawing (if grids are disabled).
Screen coordinates are properly converted to space coordinates like the following:
- in snapping mode the Hit() method directly converts screen coordinates to grid space coordinates,
- when snapping is disabled the Convert() method is used to calculate the space coordinates to be passed to the shape to be drawn.

No comments: