never
asked on
Graphical Methodes of the PictureBox Object
I use a filling algorithm along with the point and pset methods of the picturebox to fill or mask shapes contained in a bitmap like a tree or a house
this way seems to be rather slow
is there any other way which enabels me to perform graphical analysis and changes to a bitmap rather than pset
, point methods
this way seems to be rather slow
is there any other way which enabels me to perform graphical analysis and changes to a bitmap rather than pset
, point methods
ASKER
yes floodfill API dose fill areas bounded by a color ,but i need somthing that fill areas bounded by diffrent colors , or as I said, I need somthing to perform the action of POINT and PSET methods faster than they do,thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bought This Question.
' Place the following code in the declarations section of the form.
Private Declare Sub FloodFill Lib "GDI32" Alias "FloodFill" _
(ByVal hDC As Long, ByVal X As Long, ByVal Y As _
Long, ByVal crColor As Long) As Long
Private Sub Form_Click ()
ScaleMode = vbPixels ' Windows draws in pixels.
ForeColor = vbBlack ' Set draw line to black.
Line (100, 50)-(300, 50) ' Draw a triangle.
Line -(200, 200)
Line -(100, 50)
FillStyle = vbFSSolid ' Set FillStyle to solid.
FillColor = RGB(128, 128, 255) ' Set FillColor.
' Call Windows API to fill.
FloodFill hDC, 200, 100, ForeColor
End Sub