G2D.Curve - boxgaming/qbjs GitHub Wiki
Draws a quadratic curve.
Syntax
G2D.Curve sx&, sy&, cy&, cy&, ex&, ey&[, clr~&]
Parameters
- The curve will be drawn between the specified starting position (sy&, sy&) and the ending position (ex&, ey&_).
- The center position (cx&, cy&) is used to define the direction and depth of the curve.
- The optional color~& parameter defines the color of the triangle. If not specified, the default color will be used.
Examples
Example1: Draw a quadratic curve between two specified locations on screen.
Import G2D From "lib/graphics/2d.bas"
Dim As Integer sx, sy, cx, cy, ex, ey
sx = 100: sy = 100
cx = 250: cy = 50
ex = 200: ey = 200
Circle (sx, sy), 5, 9
Circle (ex, ey), 5, 9
Circle (cx, cy), 5, 14
G2D.Curve sx, sy, cx, cy, ex, ey, 2