GDI+: Matrix transformation

Talyrond

Active member
Joined
Nov 25, 2004
Messages
38
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!
 

Attachments

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, theyll be drawn. :)
 
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
 
I would figure that its a "limitation" of GDI+, since theres 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)
 
Back
Top