-
Hi.
I need to draw hatching in a region of a picturebox which is not define by the Createwhateverrgn Api.
Example: I draw a circle, then I draw a line which is drawn accross the circle. How can I fill one side of the circle by defining an x,y point corresponding to the side to fill?
Thanks.
-
Go to my thread about pathfinding and read the explanation of my pathfindindin method. Just use the first part as fill function. Works great. I just did this in school!
-
The first part???
Hummm..
The first part? Well, I have to admit I didn't get the relation between my problem and your pathfinding one. Could you explain again please? Are you talkig about your A method?
-
If it's painting a region with the same color then floodfill api is for you
Code:
Private Declare Function FloodFill Lib "GDI32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long) As Long
'To use
FloodFill hDC, 100, 100, vbRed
-
Thank you very much!
Yep, that's what I need. I know Extfloodfill works great with hatching, but I haven't tried Floodfill.
Thanks!
-
Of course the floodfill method is much better, than the way I proposed, just to explain:
A function that calls itself very often, till all places in an multidimensional array (your bitmap), are filled! That's all
Cu