class StumpyCore::Canvas

Defined in:

stumpy_utils/circle.cr
stumpy_utils/line.cr
stumpy_utils/polygon.cr
stumpy_utils/text.cr
stumpy_utils/transform.cr

Instance Method Summary

Instance Method Detail

def circle(center_x, center_y, radius, color = RGBA::BLACK, filled = false) #

Xiaolin Wu's circle algorithm


[View source]
def fill_polygon(vertices, color = RGBA::BLACK) #

[View source]
def flip_horizontal! #

[View source]
def flip_vertical! #

[View source]
def line(x0 : Int, y0 : Int, x1 : Int, y1 : Int, color = RGBA::BLACK) #

Xiaolin Wu's line algorithm


[View source]
def line(x0, y0, x1, y1, color = RGBA::BLACK) #

[View source]
def line_bresenham(x0, y0, x1, y1, color = RGBA::BLACK) #

Bresenham


[View source]
def text(x, y, string, font, color = RGBA::BLACK) #

[View source]