|
-
Sep 25th, 2000, 06:38 PM
#1
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.
-
Sep 25th, 2000, 06:47 PM
#2
Frenzied Member
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!
Sanity is a full time job
Puh das war harter Stoff!
-
Sep 25th, 2000, 07:18 PM
#3
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?
-
Sep 26th, 2000, 07:02 AM
#4
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 26th, 2000, 09:05 AM
#5
Thank you very much!
Yep, that's what I need. I know Extfloodfill works great with hatching, but I haven't tried Floodfill.
Thanks!
-
Sep 26th, 2000, 03:21 PM
#6
Frenzied Member
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
Sanity is a full time job
Puh das war harter Stoff!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|