locked
Precise positioning RRS feed

  • Question

  • Is it possible to position controls with a very high precision besides the default one?. I mean, If I want to set

    the Top property of a control in tenths or even hundredeths of a milimeter. Would it be possible?

    I know this is particularly usefull if I need to draw controls in a very large zoomout state.

    Thanks in advance for any response.

    Tuesday, September 11, 2007 7:15 PM

Answers

  •  

    Mip mapping is what you are looking for: http://en.wikipedia.org/wiki/Mipmap

     

    And store in memory the most precise value possible. ex: if you map is 10,000 pixel of length, save everything at this scale. Then use the zoom factor on it when drawing on the screen. Games also tend to have everything power of two. (each cell is 64 of length), you zoom factor will also be a power of two this way you will not have pixel overlapping each other.

     

    If it's a 3D game, you should look at sont Level Of Detail algorithm http://en.wikipedia.org/wiki/Level_of_detail the farther your object is, the less detail you need to draw to save CPU time and by removing detail you have less funky graphic.

    Tuesday, September 11, 2007 8:48 PM

All replies

  •  

    one pixel is the best you can do on the screen, as it can only display up to one pixel.

     

    I guess you want to draw your own picture, which you need to position the area you want to zoom with precise positioning.

     

    Tuesday, September 11, 2007 7:27 PM
  • Yeah, I know one pixel is the best I can get, but I was figuring if there is some way to manipulate how the object or graphic is displayed. (Actually Im developing an application much like sim city, and I use my custom controls to draw

    roads). Because it looks really funky as I zoom out the drawings get unproportional because one pixel more makes it look

    assimetric and distance between on control and other get irregular.

    Tuesday, September 11, 2007 7:41 PM
  •  

    Mip mapping is what you are looking for: http://en.wikipedia.org/wiki/Mipmap

     

    And store in memory the most precise value possible. ex: if you map is 10,000 pixel of length, save everything at this scale. Then use the zoom factor on it when drawing on the screen. Games also tend to have everything power of two. (each cell is 64 of length), you zoom factor will also be a power of two this way you will not have pixel overlapping each other.

     

    If it's a 3D game, you should look at sont Level Of Detail algorithm http://en.wikipedia.org/wiki/Level_of_detail the farther your object is, the less detail you need to draw to save CPU time and by removing detail you have less funky graphic.

    Tuesday, September 11, 2007 8:48 PM
  • Thanks a lot! That will help me a lot!

    Regards

    Fábio

    Tuesday, September 11, 2007 8:53 PM