GDI+, FloodFill

  • Thread starter Thread starter Christian Jacob
  • Start date Start date
C

Christian Jacob

Hello,

I need to dynamically create room-plans which are supposed
to highlight given rooms. For this, I've got room-plan
templates which ahow the outline of the rooms of a
building. Now I want to say something like "Fill the
interior of this Room, given by these coordinates, with
that color".

As I understand it, the GDI+ in .NET does not offer a
FloodFill function. So how can I make this possible? Since
I am dealing with a web-application, whatever I do, it
must be fast.

Any suggestions?
 
GDI+ supports paths (GraphicsPath I think but I could be wrong) which can be
filled. You could define a path which is the shape of the room, and then
call Graphics.FillPath to do the interior drawing, and Graphics.DrawPath for
the walls.
 
Back
Top