mirror of
https://github.com/boxgaming/qbjs.git
synced 2024-05-12 08:00:12 +00:00
Page:
G2D.RoundRect
Pages
Adding Support for a New Keyword
Console.Echo
Console.Log
Console.LogLevel
Dom.Add
Dom.Alert
Dom.Confirm
Dom.Container
Dom.Create
Dom.Event
Dom.Get
Dom.GetImage
Dom.Prompt
Dom.Remove
Export
FS.DownloadFile
FS.ListDirectory
FS.UploadFile
G2D.Bezier
G2D.Curve
G2D.Ellipse
G2D.FillCircle
G2D.FillEllipse
G2D.FillRoundRect
G2D.FillTriangle
G2D.InvertRect
G2D.LineCap
G2D.LineDash
G2D.LineDashOff
G2D.LineWidth
G2D.RotoZoom
G2D.RoundRect
G2D.SaveImage
G2D.Shadow
G2D.ShadowOff
G2D.Triangle
Home
Import
QBasic Language Support
Roadmap
Samples
Storage.Clear
Storage.Get
Storage.Key
Storage.Length
Storage.Remove
Storage.Set
Supported Keywords
Unsupported Keywords
2
G2D.RoundRect
boxgaming edited this page 2023-09-29 11:13:33 -05:00
Table of Contents
Draws a rectangle with rounded corners.
Syntax
G2D.RoundRect x&, y&, width&, height&, radius[, clr~&]
Parameters
- 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.
Examples
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