Usage:
FillWithDiagonallyDrawnLines(xpnl_Main,15dip,20dip,xui.Color_ARGB(255,49, 138, 123))
B4X:
Private Sub FillWithDiagonallyDrawnLines(Target As B4XView,Thickness As Float,GapBetween As Float,Color As Int)
Dim Width As Float = Target.Width
Dim Height As Float = Target.Height
Dim xcv As B4XCanvas
xcv.Initialize(Target)
Dim p As Float = -(IIf(Width > Height,Width,Height))-Thickness
Do While p <= Width
xcv.DrawLine(p,0 - (Thickness/2),Width + p,Height + (Thickness/2),Color,Thickness)
p = p + GapBetween + Thickness
Loop
xcv.Invalidate
End Sub
Fill a UIView with diagonally drawn lines?
How to fill a UIView like this (with some diagonally drawn white lines). PS: My intentions is about the fill not the border. Any help?
stackoverflow.com
Last edited: