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)) #

[View source]
def self.new(size_x : Int32, size_y : Int32, value : T) #

[View source]

Instance Method Detail

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

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

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

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

[View source]
def clone #

[View source]
def data : Slice(T) #

[View source]
def each_column(& : Iterator(UInt8), Int32 -> ) #

[View source]
def each_row(& : Iterator(UInt8), Int32 -> ) #

[View source]
def print_to_console #

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


[View source]
def size #
Description copied from module Indexable(T)

Returns the number of elements in this container.


[View source]
def size(*args, **options) #

[View source]
def size(*args, **options, &) #

[View source]
def size_x : Int32 #

[View source]
def size_y : Int32 #

[View source]
def unsafe_fetch(*args, **options) #

[View source]
def unsafe_fetch(*args, **options, &) #

[View source]
def unsafe_put(*args, **options) #

[View source]
def unsafe_put(*args, **options, &) #

[View source]