Sub Process_Globals
Type my_rect(left As Float, top As Float, width As Float, height As Float)
Dim rect1 As my_rect
End Sub
Sub Globals
Private c As Canvas
End Sub
Sub Activity_Create(FirstTime As Boolean)
rect1.Left = 100dip
rect1.Width = 200dip
rect1.Top = 10dip
rect1.Height = 100dip
c.Initialize(Activity)
c.DrawRect(set_rect(rect1),Colors.Yellow,True,0)
End Sub
Sub set_rect(r As my_rect) As Rect
Dim newrect As Rect
newrect.Initialize(r.left,r.top,r.left+r.width,r.top+r.height)
Return newrect
End Sub