Reputation: 1339
Is there a way to use Canvas.FloodFill in D2007 to fill a custom shaped object with gradient colors. Going from white to a border color. I couldn't google out anything useful.
Or just any other way of filling a custom shaped object with gradient colors?
Thank you.
Upvotes: 3
Views: 1657
Reputation: 1364
Have you checked GDI+ already? You can make Shapes (Pathes) and gradient-fill them with GDI+. There are some Delphi-Wrappers around for GDI+ with examples:
Here is a starting point:
http://www.bilsen.com/gdiplus/index.shtml
Upvotes: 0
Reputation: 5393
I don't think so.
Floodfill takes uses whatever the current brush color is set to, you can't change it during the flood fill.
You could however use floodfill to set the color to something not already in the image, then loop over the pixels, check for that color of the pixel, and do a gradient fill that way. That would take care of the boundary detection for you.
Upvotes: 2