struct Goban::Canvas(T)

Overview

Data type representing 2D canvas symbol.

Included Modules

Defined in:

goban/canvas.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(size_x : Int32, size_y : Int32, data : Slice(T)) #

def self.new(size_x : Int32, size_y : Int32, value : T) #

Instance Method Detail

def [](x : Int, y : Int) #

def []=(x : Int, y : Int, w : Int, h : Int, value : UInt8) #

def []=(x : Int, y : Int, value : UInt8) #

def []?(x : Int, y : Int) #

def clone #

def data : Slice(T) #

def each_column(& : Iterator(UInt8), Int32 -> ) #

def each_row(& : Iterator(UInt8), Int32 -> ) #

def print_to_console #

Prints the modules on the canvas as a text in the console.


def size #
Description copied from module Indexable(T)

Returns the number of elements in this container.


def size(*args, **options) #

def size(*args, **options, &) #

def size_x : Int32 #

def size_y : Int32 #

def unsafe_fetch(*args, **options) #

def unsafe_fetch(*args, **options, &) #

def unsafe_put(*args, **options) #

def unsafe_put(*args, **options, &) #