nPoly / vector based FlooFill ? How or where?
Blitz3D Forums/Blitz3D Programming/nPoly / vector based FlooFill ? How or where?
| ||
Hi All, I want to create a 'lasso selection tool' much like in photoshop. So I have a list with n-amount of 2d points that make up for a closed n-sided polygon. I want to draw this shape to create a mask-image, but the shape has to be FILLED as well! Drawing the shape is easy, but the filling is where I hit a brick wall. I can't use any pixel-based floodfills, because I have no idea what my shape 'looks like'. And it's lines could be crossing and intersecting, etc. I've seen one BMax sample that does it, but it uses some function _Max2Ddriver.DrawPoly() not available in BB ( http://www.blitzbasic.com/codearcs/codearcs.php?code=1664 ). I googled till me eyes were bleeding, but didn't find anything. Does anyone have any pointers, links or ideas? Thanks, Danny. |
| ||
Have a look at this tesselate function. http://www.blitzbasic.com/codearcs/codearcs.php?code=826 It's primarily for 3d so you'll obviously have to have your own 2d polygon function to fill each one. It should point you in the right direction though. Stevie |