' gambas class file
Public Ancho As Integer
Public Alto As Integer
Public Sub DrawingArea1_Arrange()
Ancho = DrawingArea1.Width
Alto = DrawingArea1.Height
Print "Ancho=" & Ancho
Print "Alto=" & Alto
DrawingArea1_Draw()
End
Public Sub Form_Open()
End
Public Sub DrawingArea1_Draw()
dibuja()
End
Public Sub dibuja()
DrawingArea1.Clear
Paint.Begin(DrawingArea1)
Paint.LineWidth = 2
Paint.Brush = Paint.Color(Color.Black)
Paint.Arc(Ancho / 2, Alto / 2, Min(Ancho / 2, Alto / 2))
Paint.Stroke
Paint.End
End
Public Ancho As Integer
Public Alto As Integer
Public Sub DrawingArea1_Arrange()
Ancho = DrawingArea1.Width
Alto = DrawingArea1.Height
Print "Ancho=" & Ancho
Print "Alto=" & Alto
DrawingArea1_Draw()
End
Public Sub Form_Open()
End
Public Sub DrawingArea1_Draw()
dibuja()
End
Public Sub dibuja()
DrawingArea1.Clear
Paint.Begin(DrawingArea1)
Paint.LineWidth = 2
Paint.Brush = Paint.Color(Color.Black)
Paint.Arc(Ancho / 2, Alto / 2, Min(Ancho / 2, Alto / 2))
Paint.Stroke
Paint.End
End
No hay comentarios.:
Publicar un comentario