Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
cvs.Initialize(Panel1)
DrawHorizontal(50dip, 300dip, 50dip)
DrawVertical(50dip, 300dip, 300dip)
cvs.Invalidate
End Sub
Private Sub DrawVertical(Top As Int, Bottom As Int, Left As Int)
Dim r As B4XRect
r.Initialize(Left - StrokeWidth / 2, Top - StrokeWidth / 2, Left + StrokeWidth / 2, Bottom + StrokeWidth / 2)
Dim path As B4XPath
path.InitializeRoundedRect(r, StrokeWidth / 2)
cvs.DrawPath(path, xui.Color_Red, True, 0)
End Sub
Private Sub DrawHorizontal(Left As Int, Right As Int, Top As Int)
Dim r As B4XRect
r.Initialize(Left - StrokeWidth / 2, Top - StrokeWidth / 2, Right + StrokeWidth / 2, Top + StrokeWidth / 2)
Dim path As B4XPath
path.InitializeRoundedRect(r, StrokeWidth / 2)
cvs.DrawPath(path, xui.Color_Red, True, 0)
End Sub