Study Dungeon  1.0.0
A group project for COSC345
Public Member Functions
ConsoleUI::ANSIArt Class Reference

A object that holds art containing 256bit colour ANSI codes. More...

#include <menu.h>

Public Member Functions

 ANSIArt (std::vector< std::vector< int >> codes, const std::string &name, int x=0, int y=0)
 Construct a new ANSIArt object. More...
 
size_t getWidth ()
 Get the width of the art. More...
 
size_t getHeight ()
 Get the Height of the art. More...
 
int getX ()
 Get the left most position. More...
 
int getY ()
 Get the top most position. More...
 
void setPosition (int x, int y)
 Set the position of the top left corner of the artwork. More...
 
std::string getName ()
 Get the Name of the artwork. More...
 
std::string toString ()
 Convert the 256bit colour codes into a string of ANSI codes. More...
 
std::vector< std::vector< int > > getCodes ()
 Get the 256bit colour codes. More...
 

Detailed Description

A object that holds art containing 256bit colour ANSI codes.

Constructor & Destructor Documentation

◆ ANSIArt()

ConsoleUI::ANSIArt::ANSIArt ( std::vector< std::vector< int >>  codes,
const std::string &  name,
int  x = 0,
int  y = 0 
)

Construct a new ANSIArt object.

Parameters
codesvector of vectors/rows of 256bit colour values
namename of the artwork
xleft most position
ytop most position

Member Function Documentation

◆ getCodes()

std::vector< std::vector< int > > ConsoleUI::ANSIArt::getCodes ( )

Get the 256bit colour codes.

Returns
std::vector<std::vector<int>>

◆ getHeight()

size_t ConsoleUI::ANSIArt::getHeight ( )

Get the Height of the art.

Returns
size_t

◆ getName()

std::string ConsoleUI::ANSIArt::getName ( )

Get the Name of the artwork.

Returns
std::string

◆ getWidth()

size_t ConsoleUI::ANSIArt::getWidth ( )

Get the width of the art.

Returns
size_t

◆ getX()

int ConsoleUI::ANSIArt::getX ( )

Get the left most position.

Returns
int

◆ getY()

int ConsoleUI::ANSIArt::getY ( )

Get the top most position.

Returns
int

◆ setPosition()

void ConsoleUI::ANSIArt::setPosition ( int  x,
int  y 
)

Set the position of the top left corner of the artwork.

Parameters
xleft most position
ytop most position

◆ toString()

std::string ConsoleUI::ANSIArt::toString ( )

Convert the 256bit colour codes into a string of ANSI codes.

Returns
std::string

The documentation for this class was generated from the following files: