Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all

 

I am programming the zoom on by CAD system. The problem I have is when I

what to zoom in on very small primitives. I have attached a small project to

demonstrate, the program draws a horizontal line and scales it to fit with a 10

pixel border.

 

If you change the m_startX and/or the m_endX to any value you want you will see that the line scales as expected

 

When the line is 0.00059 in length or smaller it will not be drawn, for example if you had: m_startX = 0 m_endX = 0.0005

 

 

So my question whether I am using the Matrix transformation correctly? Or

have I hit some sort of limit. I know that I am talking about very small

numbers, but I will be working with these sorts of sizes. I have a couple of ideas to work around this but I am interested in what is really going on, so I have a better understanding.

 

Any help would be appreciated, I am struggling with this one.

 

Cheers!

Small Units.zip

  • Leaders
Posted

Perhaps you should be starting from a farther zoom out base level.

So instead of starting out at 1x, try starting out at 0.1x (and say that it is 1x :) ).

 

That way, your lines are longer by values, and hopefully, they'll be drawn. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted

Thanks for taking the time to look at my problem Iceplug.

 

Yes that sounds like a viable solution, good idea!

 

I know you have a lot of experience in this field, so would you say that I have used the matrix correctly and that the effect I am seeing is just a limitation of GDI+, that�s my real worry, my package will making extensive use of them so I don�t want to be coding with sub standard techniques, that I need to re do later!

 

Cheers

 

Talyrond

  • Leaders
Posted
I would figure that it's a "limitation" of GDI+, since there's likely not going to be much need to draw a line with a length of under 6/1000s of a pixel. (You have to zoom in by 1000/6, or 166x times to see it, though)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...