My Project
|
#include <image.h>
Public Member Functions | |
Image (int w, int h) | |
~Image () | |
void | setPixel (int x, int y, uchar val) |
uchar | getPixel (int x, int y) const |
void | writeChar (int x, int y, char c, uchar fg) |
void | writeString (int x, int y, const char *s, uchar fg) |
void | drawHorzLine (int y, int xs, int xe, uchar colIndex, uint mask) |
void | drawHorzArrow (int y, int xs, int xe, uchar colIndex, uint mask) |
void | drawVertLine (int x, int ys, int ye, uchar colIndex, uint mask) |
void | drawVertArrow (int x, int ys, int ye, uchar colIndex, uint mask) |
void | drawRect (int x, int y, int width, int height, uchar colIndex, uint mask) |
void | fillRect (int x, int y, int width, int height, uchar colIndex, uint mask) |
bool | save (const char *fileName, int mode=0) |
uint | getWidth () const |
uint | getHeight () const |
uchar * | getData () const |
Static Public Member Functions | |
static uint | stringLength (const char *s) |
Private Attributes | |
int | width |
int | height |
uchar * | data |
Friends | |
uint | stringLength (const char *s) |
Image::Image | ( | int | w, |
int | h | ||
) |
Definition at line 210 of file image.cpp.
References Color::blue, Config_getInt, data, Color::green, height, ColoredImage::hsl2rgb(), Color::red, and width.
void Image::drawHorzArrow | ( | int | y, |
int | xs, | ||
int | xe, | ||
uchar | colIndex, | ||
uint | mask | ||
) |
Definition at line 335 of file image.cpp.
References drawHorzLine(), and drawVertLine().
Referenced by TreeDiagram::drawConnectors().
void Image::drawHorzLine | ( | int | y, |
int | xs, | ||
int | xe, | ||
uchar | colIndex, | ||
uint | mask | ||
) |
Definition at line 325 of file image.cpp.
References setPixel().
Referenced by TreeDiagram::drawConnectors(), drawHorzArrow(), drawRect(), drawVertArrow(), and writeBitmapBox().
void Image::drawRect | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
uchar | colIndex, | ||
uint | mask | ||
) |
Definition at line 366 of file image.cpp.
References drawHorzLine(), and drawVertLine().
Referenced by writeBitmapBox().
void Image::drawVertArrow | ( | int | x, |
int | ys, | ||
int | ye, | ||
uchar | colIndex, | ||
uint | mask | ||
) |
Definition at line 355 of file image.cpp.
References drawHorzLine(), and drawVertLine().
Referenced by TreeDiagram::drawConnectors().
void Image::drawVertLine | ( | int | x, |
int | ys, | ||
int | ye, | ||
uchar | colIndex, | ||
uint | mask | ||
) |
Definition at line 346 of file image.cpp.
References setPixel().
Referenced by TreeDiagram::drawConnectors(), drawHorzArrow(), drawRect(), and drawVertArrow().
void Image::fillRect | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
uchar | colIndex, | ||
uint | mask | ||
) |
Definition at line 374 of file image.cpp.
References setPixel().
Referenced by writeBitmapBox().
|
inline |
|
inline |
Definition at line 43 of file image.h.
References height.
Referenced by TreeDiagram::drawBoxes(), TreeDiagram::drawConnectors(), and FormulaList::generateBitmaps().
uchar Image::getPixel | ( | int | x, |
int | y | ||
) | const |
|
inline |
Definition at line 42 of file image.h.
References width.
Referenced by FormulaList::generateBitmaps().
bool Image::save | ( | const char * | fileName, |
int | mode = 0 |
||
) |
Definition at line 383 of file image.cpp.
References Color::alpha, Color::blue, LodePNG_InfoPng::color, LodePNG_InfoRaw::color, LodePNG_InfoColor::colorType, Config_getBool, data, Color::green, height, LodePNG_Encoder::infoPng, LodePNG_Encoder::infoRaw, LodePNG_encode(), LodePNG_Encoder_cleanup(), LodePNG_Encoder_init(), LodePNG_InfoColor_addPalette(), LodePNG_saveFile(), palette3, Color::red, and width.
Referenced by FormulaList::generateBitmaps().
void Image::setPixel | ( | int | x, |
int | y, | ||
uchar | val | ||
) |
Definition at line 250 of file image.cpp.
References data, height, and width.
Referenced by drawHorzLine(), drawVertLine(), fillRect(), FormulaList::generateBitmaps(), and writeChar().
|
static |
void Image::writeChar | ( | int | x, |
int | y, | ||
char | c, | ||
uchar | fg | ||
) |
Definition at line 264 of file image.cpp.
References charHeight, charPos, charSetWidth, charWidth, fontRaw, getPixel(), and setPixel().
Referenced by writeString().
void Image::writeString | ( | int | x, |
int | y, | ||
const char * | s, | ||
uchar | fg | ||
) |
Definition at line 301 of file image.cpp.
References charWidth, and writeChar().
Referenced by writeBitmapBox().
|
friend |
Definition at line 314 of file image.cpp.
Referenced by TreeDiagram::computeExtremes(), and writeBitmapBox().
|
private |
Definition at line 50 of file image.h.
Referenced by getData(), getPixel(), Image(), save(), setPixel(), and ~Image().
|
private |
Definition at line 49 of file image.h.
Referenced by getHeight(), getPixel(), Image(), save(), and setPixel().
|
private |
Definition at line 48 of file image.h.
Referenced by getPixel(), getWidth(), Image(), save(), and setPixel().