GDI Graphics are Imprecise

  • Thread starter Thread starter existential.philosophy
  • Start date Start date
E

existential.philosophy

When I use standard GDI graphics methods, like DrawRectangle or
FillEllipse, I've noticed that the results are slightly off.

I seldom work with graphics, but I'm doing a project now which
requires me to draw precise shapes. I've discovered that, in order to
get crisp results, I have to "nudge" the coordinates. For instance,
instead of drawing a rectangle with

DrawRectangle(Pen1, X, Y, Width, Height)

I must use

DrawRectangle(Pen1, X + 0.001953, Y + 0.001953, Width, Height)

Is anyone familiar with this issue? I'm guessing it is a problem with
Windows (I'm using Windows XP Pro), but I'd like to learn more.


-TC
 
When I use standard GDI graphics methods, like DrawRectangle or
FillEllipse, I've noticed that the results are slightly off.

No need to repost -- the same question posted by you yesterday got two
replies in the meantime.
 
Back
Top