Ellipse()
Syntax
Ellipse(x, y, RadiusX, RadiusY [, Color])Description
Draw a filled ellipse at the position x,y with size of RadiusX and RadiusY. If the 'Color' parameter is not specified, the default color set with FrontColor() will be used. RGB() can be used to get a valid color value. The current output is set with StartDrawing().
Example:; Several ellipses with random colors Width = 220 Height = 150 If OpenWindow(0, 0, 0, Width, Height, #PB_Window_SystemMenu|#PB_Window_ScreenCentered, "Ellipses") If StartDrawing(WindowOutput()) x = Width/2 y = Height/2 For radius=Height/2 To 10 Step -10 Ellipse(x, y, radius*Width/Height, radius, RGB(Random(255),Random(255),Random(255))) Next radius StopDrawing() ; This is absolutely needed when the drawing operations are finished !!! Never forget it ! EndIf Repeat : EventID = WaitWindowEvent() : Until EventID = #PB_Event_CloseWindow EndIf
Supported OS
All