• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Creating a CRgn from a given point

I want to perform a flood fill operation with a given point. But first I want to create a region by detecting the outline and make some modifications.

Can someone let me know a good flood fill source code/algorithm for irregular shapes, which can also help me create a CRgn object of the shape to be filed.
0
akhilesh
Asked:
akhilesh
1 Solution
 
akhileshAuthor Commented:
Adjusted points to 262
0
 
RaffaeleCommented:
I can't understand well.
MFC gives you the ExtFloodFill to fill a clipping region.
You can create a clipping region with the CRgn class members.
What else do you need? Why do you need to perform manually the fill?
0
 
RONSLOWCommented:
So you are trying to generate a CRgn from some arbitrary existing shapes and a starting point.

This, of course, isn't required for doing the flood fill.  I assume that you want the CRgn for other purposes.

A flood fill algorithm can be easily adapted to give you the points on the boundary.  The, once you have the points, you should be able to generate a region.

Is this what you want???
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now