No matching definitions.

raylib/shapes

src/raylib/shapes.tur
defn

draw-circle

(draw-circle [cx :int cy :int radius :float col :int] :void)

draw a filled circle using integer center coordinates.

cxcenter x (pixels)
cycenter y (pixels)
radiuscircle radius (pixels)
colColor handle
(draw-circle 400 300 50.0 (red))

Since: P3

defn

draw-circle-v

(draw-circle-v [center :int radius :float col :int] :void)

draw a filled circle using a Vector2 center handle.

centerVector2 handle for center position
radiuscircle radius (pixels)
colColor handle
(draw-circle-v pos 40.0 (red))

Since: P3

defn

draw-rectangle

(draw-rectangle [x :int y :int w :int h :int col :int] :void)

draw a filled axis-aligned rectangle.

xleft edge (pixels)
ytop edge (pixels)
wwidth (pixels)
hheight (pixels)
colColor handle
(draw-rectangle 100 100 200 150 (blue))

Since: P3

defn

draw-rectangle-rec

(draw-rectangle-rec [rec :int col :int] :void)

draw a filled rectangle from a Rectangle handle.

recRectangle handle (x y width height; construct with make-rect below)
colColor handle
(draw-rectangle-rec my-rect (green))

Since: P3

defn

draw-line

(draw-line [x1 :int y1 :int x2 :int y2 :int col :int] :void)

draw a line between two points given as integer coordinates.

x1 y1 -- start point (pixels)
x2 y2 -- end point (pixels)
colColor handle
(draw-line 0 0 800 600 (white))

Since: P3

defn

draw-line-v

(draw-line-v [start :int end :int col :int] :void)

draw a line between two Vector2 handle endpoints.

startstart Vector2 handle
endend Vector2 handle
colColor handle
(draw-line-v p1 p2 (white))

Since: P3

defn

draw-triangle

(draw-triangle [v1 :int v2 :int v3 :int col :int] :void)

draw a filled triangle given three Vector2 handle vertices.

v1 v2 v3 -- Vector2 handle vertices (counter-clockwise winding)
colColor handle
(draw-triangle a b c (yellow))

Since: P3

Internal definitions
__make-vec2-- allocate a Raylib Vector2 from separate x y floats.