GraphicsPath performance problems advice needed

  • Thread starter Thread starter James dean
  • Start date Start date
J

James dean

I am using Graphics path in my application and i have located the slow
areas in my rogram and it seems that the graphics path consistently is
slow when doing any operation like adding another graphics path, adding
text etc......and also drawing the Graphics path onto the drawing
surface using the Graphics class is also slow. Am i doing something
wrong or is this the fault of GDI+ which i have heard was slow?.....is
this a correct assumption...
 
Hi James,

Try to use, properties of the Graphics:

CompositingQuality (HighSpeed)
InterpolationMode (Low or NearestNeighbor)
SmoothingMode (HighSpeed)

I'm not sure which of them works with GraphicsPath, but i don't
know any better solution.

Do you draw those paths on "Paint" event or do you prepare a Bitmap
and then draw it?

HTH
Marcin
 
Marcin,
I know that the paint method is important as if its overused then it
will redraw too many times and slow the application down. Well i have
checked that but no in fact it is drawing a textbox that is very slow
and any time a string is added to the graphics path or the graphics path
gets drawn then it slows it down. I actually ran devpartner on the code
and it told me that my slowest lines were what i have mentioned
above...but really not sure how i can make it faster....
 
Back
Top