List Info

Thread: Rectangle Intersect problem




Rectangle Intersect problem
user name
2006-02-16 14:25:24
Hi

I'm working on a custom control thats pretty graphics
intensive, it can
at an extreme with current test data, have upto 60,000 lines
(each with
upto around 4 or 5 points).

To improve speed I'm using a pretty slow checking procedure
that tests
the start and end points and whether the line intersects the
box I'm
giving it as my screen.

The problem is, is that its slow... and so far I'm unable
to find a
built in procedure for this or any fast code anywhere to
solve the
problem.

Surely the Rectangle.IntersectsWith() procedure uses line
intersect
algorithm... but I can't figure how to get access to it...
which I
probably can't...

so, any suggestions or advice?

GDI+ seems to be dirt slow at drawing thousands of lines,
I'm trying to
optimize things as much as I can as when I originally wrote
this I was
new to C#, but 6 months later I have made quite a few
optimizations but
it's still terribly slow when I "zoom out" and
need to render a lot
more lines with scaling.

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

Rectangle Intersect problem
user name
2006-02-24 15:13:53
well I've managed to improve the speed of the line
checking, but it
appears the real slowness is in GDI+, it seems strange that
drawing
50,000 lines is enough to cripple it into a couple of frames
per second


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Developers" group.
To post to this group, send email to CSDevelopersgooglegroups.com
To unsubscribe from this group, send email to
CSDevelopers-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/CSDevelopers
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )