CREATES A PPM image of a table for braid word. More...
#include <WordDraw.h>
Public Member Functions | |
WordDraw (int n, const Word &w, bool draw_grid=true) | |
WordDraw (int n, const list< Word > &w, bool draw_grid=true) | |
~WordDraw () | |
void | saveTo (const string &f_name) |
Private Member Functions | |
void | drawCompressedBraid (const Word &theWord, int vert_offset=0) |
void | drawGenerator (Generator g, int pos, int vert_offset) |
void | drawVerticalGrid (int vpos, int color) |
void | drawHorizontalGrid (int hpos) |
Private Attributes | |
int | N |
CImage * | theImage |
int | ss |
int | theLength |
int | betBraids |
CREATES A PPM image of a table for braid word.
Definition at line 30 of file WordDraw.h.
WordDraw::WordDraw | ( | int | n, | |
const Word & | w, | |||
bool | draw_grid = true | |||
) | [inline] |
Definition at line 33 of file WordDraw.h.
References drawCompressedBraid(), drawHorizontalGrid(), drawVerticalGrid(), AImage::getHeight(), AImage::getWidth(), Word::length(), CImage::setBluePixel(), CImage::setGreenPixel(), CImage::setRedPixel(), ss, ssConst, theImage, and theLength.
WordDraw::WordDraw | ( | int | n, | |
const list< Word > & | w, | |||
bool | draw_grid = true | |||
) | [inline] |
Definition at line 60 of file WordDraw.h.
References betBraids, drawCompressedBraid(), drawHorizontalGrid(), drawVerticalGrid(), ss, ssConst, theImage, and theLength.
WordDraw::~WordDraw | ( | ) | [inline] |
Definition at line 101 of file WordDraw.h.
References theImage.
void WordDraw::drawCompressedBraid | ( | const Word & | theWord, | |
int | vert_offset = 0 | |||
) | [inline, private] |
Definition at line 113 of file WordDraw.h.
References Word::begin(), drawGenerator(), Word::end(), N, and theLength.
Referenced by WordDraw().
void WordDraw::drawGenerator | ( | Generator | g, | |
int | pos, | |||
int | vert_offset | |||
) | [inline, private] |
Definition at line 128 of file WordDraw.h.
References CImage::setBluePixel(), CImage::setGreenPixel(), CImage::setRedPixel(), ss, and theImage.
Referenced by drawCompressedBraid().
void WordDraw::drawHorizontalGrid | ( | int | hpos | ) | [inline, private] |
Definition at line 152 of file WordDraw.h.
References CImage::setBluePixel(), CImage::setGreenPixel(), CImage::setRedPixel(), ss, theImage, and theLength.
Referenced by WordDraw().
void WordDraw::drawVerticalGrid | ( | int | vpos, | |
int | color | |||
) | [inline, private] |
Definition at line 143 of file WordDraw.h.
References AImage::getHeight(), CImage::setBluePixel(), CImage::setGreenPixel(), CImage::setRedPixel(), and theImage.
Referenced by WordDraw().
void WordDraw::saveTo | ( | const string & | f_name | ) | [inline] |
Definition at line 102 of file WordDraw.h.
References CImage::saveTo(), and theImage.
int WordDraw::betBraids [private] |
Definition at line 165 of file WordDraw.h.
Referenced by WordDraw().
int WordDraw::N [private] |
Definition at line 161 of file WordDraw.h.
Referenced by drawCompressedBraid().
int WordDraw::ss [private] |
Definition at line 163 of file WordDraw.h.
Referenced by drawGenerator(), drawHorizontalGrid(), and WordDraw().
CImage* WordDraw::theImage [private] |
Definition at line 162 of file WordDraw.h.
Referenced by drawGenerator(), drawHorizontalGrid(), drawVerticalGrid(), saveTo(), WordDraw(), and ~WordDraw().
int WordDraw::theLength [private] |
Definition at line 164 of file WordDraw.h.
Referenced by drawCompressedBraid(), drawHorizontalGrid(), and WordDraw().