```
Public Sub IsLimit(BC As BitmapCreator,x As Int, y As Int) As Boolean
Dim cp As Int = x * 4 + y * BC.mWidth * 4
Return BC.Buffer(cp + 3) = 01
End Sub
Private Sub DrawPathFill(BC As BitmapCreator,PointList As List, Color As Int)
Dim aColor As ARGBColor = ColorToARGB(Color)
Dim P As Point_Type = PointList.Get(PointList.Size-1)
Dim Xl As Int = P.X
Dim Yl As Int = P.Y
Dim MaxX As Int = Xl
Dim MinX As Int = Xl
Dim MaxY As Int = Yl
Dim MinY As Int = Yl
Dim Alimit As ARGBColor = ColorToARGB(xui.Color_ARGB(1,0,0,0))
For Each P As Point_Type In PointList
Dim Dx,Dy,Diff As Int
Dim x,y As Float
Dx = P.x - Xl
Dy = P.Y - Yl
Diff=Max(Abs(Dx),Abs(Dy))
x = Xl
y = Yl
Dim tx As Double = Dx / Diff
Dim ty As Double = Dy / Diff
For D=0 To Diff
BC.SetARGB(x, y, Alimit)
X = Min(Max(x + tx,0),BC.mWidth-1)
Y = Min(Max(Y + ty,0),BC.mHeight-1)
Next
ID=ID+1
Xl=P.X
Yl=P.Y
Next
For Each P As Point_Type In PointList
AddTouch(ID,ID,P.X,P.Y)
MinX=Min(MinX,P.X)
MaxX=Max(MaxX,P.X)
MinY=Min(MinY,P.y)
MaxY=Max(MaxY,P.y)
Next
For y=MinY To MaxY
Dim StartX As Int = BC.mWidth
Dim StopX As Int = -1
For x=MinX To MaxX
If IsLimit(BC,x,y) Then
StartX=Min(StartX,x)
StopX=Max(StopX,x)
End If
Next
Dim B As Boolean = False
For x=StartX To StopX
If IsLimit(BC,x,y) Then
If Not(b) Then
B=True
Else
If IsLimit(BC,x,y)=False Then B=False
End If
BC.SetARGB(x,y,aColor)
End If
If b Then BC.SetARGB(x,y,aColor)
Next
Next
End Sub
```