module CG2d::Drawable

Direct including types

Defined in:

cg2d/drawable.cr
cg2d/drawable/draw_circle.cr
cg2d/drawable/draw_line.cr

Instance Method Summary

Instance Method Detail

def draw_circle(cx : Int, cy : Int, r : Int, color) #

Draw a circle using Bresenham’s Algorithm


[View source]
def draw_circle(c : Vec, r, color) #

[View source]
def draw_line(x1 : Int, y1 : Int, x2 : Int, y2 : Int, color) #

Draw a line using Bresenham’s Algorithm


[View source]
def draw_line(p1 : CG2d::Vec, p2 : CG2d::Vec, color) #

Draw a line using Bresenham’s Algorithm


[View source]
def draw_line(line : CG2d::Line, color) #

Draw a line using Bresenham’s Algorithm


[View source]
abstract def draw_point(x, y, color) #

To be implemented by the including class


[View source]
def draw_point(point : CG2d::Vec, color) #

[View source]