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. 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 circles with random colors
  Width=200
  Height=150 
  If OpenWindow(0, 0, 0, Width, Height, #PB_Window_SystemMenu|#PB_Window_ScreenCentered, "Circles")
    If StartDrawing(WindowOutput())
      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 : EventID = WaitWindowEvent() : Until  EventID = #PB_Event_CloseWindow
  EndIf

Supported OS

All

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