By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,451 Members | 1,613 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,451 IT Pros & Developers. It's quick & easy.

Bug in GDI+?

P: n/a
my program crashes in a strange situation:

I have a GraphicsPath object with points having small
distances between them. When I try to paint this
object in a Graphics context zoomed out, there are
certain clipping situations that make the environment
crash, using a Pen with a small Width value.

After looking at GDI faqs, I noticed that you could
have problems if the scaled width of the pen (through
Graphics transformation) is less than 1'5.

You might reproduce this problem if you generate a small
sized GraphicsPath with many points, do
Graphics.ScaleTransform(0.1, 0.1), and
Graphics.DrawPath(new Pen(Color.Red, 1.0f))

but you need to move this object with the mouse on
the upper margin of the view (to perform upper clipping)
again and again until you get the crash.
(the crash only happens when doing upper clipping,
not in any other kind of clipping).

It reads:
"Unhandled Exception of type System.InvalidOperationException'
in system.drawing.dll
Object still in use"

Anyone knows how to fix this?
I need to paint zoomed out graphic paths no matter how small
they become.

Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.