I want to get any canvas line drawn immediately.
Today, he only shows the whole drawn when the loops are completely through. Below is a small example program.
Today, he only shows the whole drawn when the loops are completely through. Below is a small example program.
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Panel1 As Panel
Dim Canvas1 As Canvas
Dim Start, Ende As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Start")
Canvas1.Initialize(Panel1)
For l=0 To 10
Start= l*30
Ende= Start+20
For i = 1 To 5000 Step 4
Canvas1.DrawLine(i, Start, i+2, Ende, Colors.Red, 1dip)
Canvas1.DrawLine(i+2, Ende, i+4, Start, Colors.Red, 1dip)
Next
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub