module CG2d::Drawable
Direct including types
Defined in:
cg2d/drawable.crcg2d/drawable/draw_circle.cr
cg2d/drawable/draw_line.cr
Instance Method Summary
-
#draw_circle(cx : Int, cy : Int, r : Int, color)
Draw a circle using Bresenham’s Algorithm
- #draw_circle(c : Vec, r, color)
-
#draw_line(x1 : Int, y1 : Int, x2 : Int, y2 : Int, color)
Draw a line using Bresenham’s Algorithm
-
#draw_line(p1 : CG2d::Vec, p2 : CG2d::Vec, color)
Draw a line using Bresenham’s Algorithm
-
#draw_line(line : CG2d::Line, color)
Draw a line using Bresenham’s Algorithm
-
#draw_point(x, y, color)
To be implemented by the including class
- #draw_point(point : CG2d::Vec, color)
Instance Method Detail
def draw_line(x1 : Int, y1 : Int, x2 : Int, y2 : Int, color)
#
Draw a line using Bresenham’s Algorithm
Draw a line using Bresenham’s Algorithm