PDA

View Full Version : Scaling Cursor graphics using Pointmonitor



Coolmo
2009-11-25, 01:19 PM
I'm using a Pointmonitor handler to put temporary graphics at my cursor while prompting the user for certain onscreen things (selecting objects). I need these graphics to remain the same size when the user zooms in and out while following the on screen prompts from the program. By following the example in the "DevTV - Introduction to AutoCAD. NET" and using the "Pixels in viewport" I can get the graphics to sort-of work when the handler is first added but it seems to only grab the pixel count of the initial viewport and doesn't keep up with all the zooms during the programs operation. On screen selection and everything still works fine but the cursor graphics get bigger and smaller when the user zooms in and out. Is there another way to do this or something that I can add in to make the handler evaluate the pixels after every zoom?

Coolmo
2009-12-03, 01:27 PM
You have to get the active viewport's view parameters use that to scale your graphics accordingly.

That's what I'm doing (I think). It checks Model Space's viewport size and pixel count in some given unit. The initial "scale" of the cursor graphic objects works great no matter how far I'm zoomed in or out but as soon as it gets the initial viewport size/pixel count, it doesn't take into consideration any zooming I do while in the on-screen selection method.

Outside of my question, the whole program locks in the initial viewport zoomed area. I noticed that whenever I finish selecting things on screen and all the "stuff" happens to my selected objects, the viewport reverts back to the original viewport that it started with before the on-screen selection was called.