module Crame::Graphics

Overview

The Graphics module is the module used to draw primitive shapes on the window.

Extended Modules

Defined in:

crame/graphics.cr

Instance Method Summary

Instance Method Detail

def circle(center : Vector2, radius : Number, fill : Bool = true, color : Color = Color.new(1.0, 1.0, 1.0, 1.0)) #

Draws a circle on the window given its center and radius.


def line(start_point : Vector2, end_point : Vector2, color : Color = Color.new(1.0, 1.0, 1.0, 1.0)) #

Draws a line on the window given its start_point and end_point.


def rectangle(rect : Rect2, fill : Bool = true, color : Color = Color.new(1.0, 1.0, 1.0, 1.0)) #

Draws a rect on the window.