RoundBox()

语法

RoundBox(x, y, Width, Height, RoundX, RoundY [, Color])
概要
Draw a box of the given dimensions with rounded corners on the current output. The filling mode is determined by DrawingMode(). The current output is set with StartDrawing().

参数

x, y, Width, Height The position and size of the box in the current drawing output.
RoundX, RoundY The radius of the rounded corners in the x and y direction.
Color (optional) The color to be used for the round box. If this parameter is not specified, the default color set with FrontColor() will be used. This color can be in RGB or RGBA format.

返回值

无.

示例

  If OpenWindow(0, 0, 0, 200, 200, "2DDrawing Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If CreateImage(0, 200, 200) And StartDrawing(ImageOutput(0))
      y = 0
      For x = 0 To 95 Step 10
        RoundBox(x, y, 200-2*x, 200-2*y, 20, 20, RGB(Random(255), Random(255), Random(255)))
        y + 10 
      Next x
      StopDrawing() 
      ImageGadget(0, 0, 0, 200, 200, ImageID(0))
    EndIf
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
  EndIf

参阅

Box(), Line(), Circle(), Ellipse() FrontColor(), RGB(), RGBA(), DrawingMode()

已支持操作系统

所有

<- ResetGradientColors() - 2DDrawing Index - SetOrigin() ->