Hello everyone, I've recently picked up a project that involves
rendering 100s and potentially 1000s of individual objects onto the
screen. They vary in shape, size and color and some of them involve
computations before they can be rendered.

I'll summarize my methodology for brevity:

In the Paint event I've added code that renders my objects. The
objects are stored in memory (in either arrays or collections of some
sort). Each object has a "Draw" method which knows how to draw the
given object. I loop through all the objects and 'draw' them onto the
graphics object. So ar pretty standard stuff and to be honest I
haven't really noticed a problem with the rendering (I'm double
buffering).

I may potentially need to render many more objects. I was hoping if
someone could explain what, I imagine, must be a basic concept.

Imagine I have a 25 objects that I'm rendering on the screen like:

o o o o o
o o o o o
o o o o o
o o o o o
o o o o o

Currently I'm looping through all 25 objects and adding them to the
Graphics object. Suppose I only need to show the middle 9 so (x
represents NOT rendered):

x x x x x
x o o o x
x o o o x
x o o o x
x x x x x

I could just create a Region object and mission accomplished (from a
rendered point of view), however, from a algorithm point of view I'm
still looping through 25 objects and calling their "draw" method.

I had thought about checking if the object lies in the Region before
doing my computations thereby potentially saving some cycles per
object but some objects are complex and trying to determine if it lies
partially in the rendering Region and partially outside it would
probably take up just as many, if not more cycles.

So I guess my question is am I stuck looping through all my objects
and adding them to the Graphics object regardless of were they lie (in
or out of the rendering region) or is there a more standard method for
accomplishing this?

I hope I've made my self clear.

Thanks,
Stephan