inLimbo
TUI Music Player that keeps you in Limbo.
 
Loading...
Searching...
No Matches
tiv_lib.h File Reference
#include <array>
#include <functional>
#include <iostream>
#include "CImg.h"

Go to the source code of this file.

Classes

struct  tiv::size
 
struct  tiv::CharData
 Struct to represent a character to be drawn. More...
 

Namespaces

namespace  tiv
 

Typedefs

typedef std::function< unsigned long(int, int)> tiv::GetPixelFunction
 

Functions

int tiv::clamp_byte (int value)
 
int tiv::best_index (int value, const int STEPS[], int count)
 
double tiv::sqr (double n)
 
CharData tiv::createCharData (GetPixelFunction get_pixel, int x0, int y0, int codepoint, int pattern)
 
CharData tiv::findCharData (GetPixelFunction get_pixel, int x0, int y0, const int &flags)
 Find the best character and colors for a 4x8 part of the image at the given position.
 
cimg_library::CImg< unsigned char > tiv::load_rgb_CImg (const char *const &filename)
 
void tiv::printTermColor (std::ostream &os, const int &flags, int r, int g, int b)
 
void tiv::printCodepoint (std::ostream &os, int codepoint)
 
void tiv::printImage (const cimg_library::CImg< unsigned char > &image, const int &flags)
 
std::pair< int, int > tiv::get_windows_size ()
 

Variables

constexpr int tiv::FLAG_FG = 1
 
constexpr int tiv::FLAG_BG = 2
 
constexpr int tiv::FLAG_MODE_256 = 4
 
constexpr int tiv::FLAG_24BIT = 8
 
constexpr int tiv::FLAG_NOOPT = 16
 
constexpr int tiv::FLAG_TELETEXT = 32
 
constexpr int tiv::COLOR_STEP_COUNT = 6
 
constexpr int tiv::COLOR_STEPS [COLOR_STEP_COUNT] = {0, 0x5f, 0x87, 0xaf, 0xd7, 0xff}
 
constexpr int tiv::GRAYSCALE_STEP_COUNT = 24
 
constexpr int tiv::GRAYSCALE_STEPS [GRAYSCALE_STEP_COUNT]