-
Notifications
You must be signed in to change notification settings - Fork 10
G2D.RoundRect
boxgaming edited this page Sep 29, 2023
·
2 revisions
Draws a rectangle with rounded corners.
G2D.RoundRect x&, y&, width&, height&, radius[, clr~&]
- The rectangle will be drawn with its top left corner at the position specified by the x& and y& parameters.
- The size of the rectangle is defined by the width& and height& parameters.
- The radius& parameter the amount to which the corners will be rounded.
- The optional color~& parameter defines the color of the triangle. If not specified, the default color will be used.
Example1: Draw numerous rounded rectangles of random size at random locations.
Import G2D From "lib/graphics/2d.bas"
Randomize Timer
For i = 0 to 500
G2D.RoundRect Rnd * 640, Rnd * 400, Rnd * 200 + 10, Rnd * 200 + 10, Rnd * 40, Rnd * 14 + 1
_Limit 200
Next i