#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Type point(x As Float, y As Float)
Private fx As JFX
Private MainForm As Form
Private cnv As B4XCanvas
Private xui As XUI
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Dim center As point
center.Initialize
center.x = MainForm.RootPane.Width/2
center.y = MainForm.RootPane.Height/2
Dim lineLength As Int = 200
cnv.Initialize(MainForm.RootPane)
circleMekuvkav(center,lineLength/2)
cnv.DrawLine(center.x,center.y,center.x+lineLength,center.y,xui.Color_Black,2) '0 deg line
cnv.DrawLine(center.x,center.y,center.x+(lineLength*CosD(-30)),center.y+(lineLength*SinD(-30)),xui.Color_Black,2) '30 deg
End Sub
Sub circleMekuvkav(p As point,r As Int)
cnv.DrawCircle(p.x,p.y,r,xui.Color_Red,False,1)
For i = 0 To 360 Step 5
cnv.DrawLine(p.x,p.y,p.x*((r*2)*CosD(i)),p.y*((r*2)*SinD(i)),xui.Color_White,5)
Next
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub