B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim Canvas1 As Canvas
Dim i,r,g,b,rx,bx,gx,y As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
canvas1.Initialize(Activity)
r=4
g=128
b=180
y=400
globe
End Sub
Sub Globe
'Canvas1.DrawColor(Colors.Black)
For i=290 To 510
Canvas1.DrawLine(0,i,479,y, Colors.RGB(r,g,b),1)
Next
Activity.Invalidate
End Sub
By this code, a filled triangle must be drawn in the center of the screen but almost half of filled triangle appears. Is this a bug or the code is wrong ? Changing y variable you can see the result.