class CrImage::OneMap

Overview

Memory efficient implementation of MapImpl when all values are equal to 1

Included Modules

Defined in:

cr-image/map.cr

Constructors

Instance Method Summary

Instance methods inherited from module CrImage::Map(Int32)

[](x : Int32, y : Int32) : T
[](index : Int32) : T
[]
, []?(x : Int32, y : Int32) : T | Nil
[]?(index : Int32) : T | Nil
[]?
, height : Int32 height, shape : Tuple(Int32, Int32) shape, size : Int32 size, width : Int32 width

Constructor Detail

def self.new(width : Int32, height : Int32) #

[View source]

Instance Method Detail

def [](xstart : Int32, xcount : Int32, ystart : Int32, ycount : Int32) : OneMap #

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

[View source]
def [](xstart : Int32, yrange : Range) : OneMap #

[View source]
def [](xrange : Range, ystart : Int32) : OneMap #

[View source]
def [](xrange : Range, yrange : Range) : OneMap #

[View source]
def [](index : Int32) : Int32 #

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

[View source]
def []?(index : Int32) : Int32 #

[View source]
def height : Int32 #

[View source]
def pad(all : Int32 = 0, *, top : Int32 = 0, bottom : Int32 = 0, left : Int32 = 0, right : Int32 = 0, pad_type : EdgePolicy = EdgePolicy::Black, pad_black_value : T = T.zero) : OneMap | IntMap #

[View source]
def shape : Tuple(Int32, Int32) #

[View source]
def size : Int32 #

[View source]
def to_c : ComplexMap #

[View source]
def to_i : IntMap #

[View source]
def width : Int32 #

[View source]