class WFC::CharTexture
- WFC::CharTexture
- WFC::Texture
- Reference
- Object
Overview
A texture made up of characters.
Defined in:
wfc.crConstant Summary
- 
        EMPTY_CHAR = UInt8.new(' '.ord)
Constructors
- 
        .new(bytes, width, height)
        
          Initializes the texture from a set of bytes. 
- 
        .new(string)
        
          Initializes the texture from a string. 
- 
        .new
        
          Initializes an empty texture. 
Instance Method Summary
- 
        #bytes_per_cell
        
          The number of bytes per unit of the texture. 
- 
        #char_at(x, y)
        
          Returns the codepoint at (x, y)as aCharor throws anIndexError.
- 
        #char_at?(x, y)
        
          Returns the codepoint at (x, y)or nil.
- 
        #get(x, y)
        
          Returns the codepoint at (x, y)or throws anIndexError.
- 
        #get?(x, y)
        
          Returns the codepoint at (x, y)or nil.
- 
        #height : Int32
        
          The height of the texture. 
- 
        #load_bytes(bytes, width, height)
        
          Creates a new texture from bytes. 
- 
        #put(x, y, char : UInt8)
        
          Sets the character at (x, y)tochar.
- 
        #put(x, y, char : Char)
        
          Sets the character at (x, y)tochar.
- 
        #to_bytes : Bytes
        
          Converts the texture to an array of bytes. 
- 
        #to_s(io : IO)
        
          Prints the texture to an IO. 
- 
        #width : Int32
        
          The width of the texture.