Circle()

Syntax

Circle(x, y, Radius [, Color])
Description
Draw a filled circle on the current output at the position x,y with the size of Radius. The current output is set with StartDrawing().

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. A color table with common colors is available here.

Example:
  ; Several circles with random colors
  Width=200
  Height=150 
  If OpenWindow(0, 0, 0, Width, Height, "Circles", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If StartDrawing(WindowOutput(0))
      x = Width/2
      y = Height/2
      For Radius = Height/2 To 10 Step -10
        Circle(x, y, radius ,RGB(Random(255),Random(255),Random(255)))
      Next
      StopDrawing() ; This is absolutely needed when the drawing operations are finished !!! Never forget it !
    EndIf
    
    Repeat : Event = WaitWindowEvent() : Until  Event = #PB_Event_CloseWindow
  EndIf

Supported OS

All

<- Box() - 2DDrawing Index - DrawAlphaImage() ->