Class for drawing a braid on n strands as a square table. More...
#include <WordDraw.h>
Public Member Functions | |
BraidDrawPDF (int n, string t=string()) | |
Constructor. | |
~BraidDrawPDF () | |
void | draw (const Word &w) |
Draw a braid represented by the word w. | |
void | save (const char *f) |
Write the picture into a file. | |
void | setSS (int new_ss) |
Set the size of the square cells of the table. | |
Private Member Functions | |
void | drawGrid (int nP, int sN) |
int | tableWidth () const |
int | stripPosition (int i) |
void | drawCompressedBraid (const Word &theWord, int vert_offset=0) |
int | posInPage () const |
int | stripesInPage () const |
void | drawGenerator (Generator g, int pos, int vert_offset) |
pair< int, int > | getPageStrip (int pos) const |
Private Attributes | |
int | N |
PDFStructure | pdf_out |
int | ss |
int | theLength |
int | betBraids |
bool | useCircle |
string | theTitle |
Class for drawing a braid on n strands as a square table.
Definition at line 188 of file WordDraw.h.
BraidDrawPDF::BraidDrawPDF | ( | int | n, | |
string | t = string() | |||
) | [inline] |
Constructor.
n | - number of generators (i.e. number of strands -1 ) | |
t | - optional title which will appear on each page |
Definition at line 197 of file WordDraw.h.
BraidDrawPDF::~BraidDrawPDF | ( | ) | [inline] |
Definition at line 208 of file WordDraw.h.
void BraidDrawPDF::draw | ( | const Word & | w | ) | [inline] |
Draw a braid represented by the word w.
Definition at line 211 of file WordDraw.h.
References drawCompressedBraid(), PDFStructure::newPage(), and pdf_out.
void BraidDrawPDF::drawCompressedBraid | ( | const Word & | theWord, | |
int | vert_offset = 0 | |||
) | [inline, private] |
Definition at line 254 of file WordDraw.h.
References Word::begin(), drawGenerator(), drawGrid(), Word::end(), N, PDFStructure::newPage(), pdf_out, posInPage(), stripesInPage(), and theLength.
Referenced by draw().
void BraidDrawPDF::drawGenerator | ( | Generator | g, | |
int | pos, | |||
int | vert_offset | |||
) | [inline, private] |
Definition at line 296 of file WordDraw.h.
References PDFStructure::addObject(), getPageStrip(), PDFPage::lMargin(), pdf_out, posInPage(), ss, stripPosition(), and useCircle.
Referenced by drawCompressedBraid().
void BraidDrawPDF::drawGrid | ( | int | nP, | |
int | sN | |||
) | [inline, private] |
Definition at line 230 of file WordDraw.h.
References PDFStructure::addObject(), PDFPage::lMargin(), PDFPage::mWidth(), pdf_out, ss, stripPosition(), tableWidth(), theTitle, and PDFPage::tMargin().
Referenced by drawCompressedBraid().
pair<int,int> BraidDrawPDF::getPageStrip | ( | int | pos | ) | const [inline, private] |
Definition at line 319 of file WordDraw.h.
References posInPage(), and stripesInPage().
Referenced by drawGenerator().
int BraidDrawPDF::posInPage | ( | ) | const [inline, private] |
Definition at line 293 of file WordDraw.h.
References PDFPage::mWidth(), and ss.
Referenced by drawCompressedBraid(), drawGenerator(), and getPageStrip().
void BraidDrawPDF::save | ( | const char * | f | ) | [inline] |
Write the picture into a file.
Definition at line 220 of file WordDraw.h.
References pdf_out, and PDFStructure::save().
void BraidDrawPDF::setSS | ( | int | new_ss | ) | [inline] |
Set the size of the square cells of the table.
Definition at line 225 of file WordDraw.h.
References ss.
int BraidDrawPDF::stripesInPage | ( | ) | const [inline, private] |
Definition at line 294 of file WordDraw.h.
References PDFPage::mHeight(), N, and ss.
Referenced by drawCompressedBraid(), and getPageStrip().
int BraidDrawPDF::stripPosition | ( | int | i | ) | [inline, private] |
Definition at line 247 of file WordDraw.h.
References ss, tableWidth(), theTitle, and PDFPage::tMargin().
Referenced by drawGenerator(), and drawGrid().
int BraidDrawPDF::tableWidth | ( | ) | const [inline, private] |
Definition at line 245 of file WordDraw.h.
Referenced by drawGrid(), and stripPosition().
int BraidDrawPDF::betBraids [private] |
Definition at line 334 of file WordDraw.h.
int BraidDrawPDF::N [private] |
Definition at line 330 of file WordDraw.h.
Referenced by drawCompressedBraid(), stripesInPage(), and tableWidth().
PDFStructure BraidDrawPDF::pdf_out [private] |
Definition at line 331 of file WordDraw.h.
Referenced by draw(), drawCompressedBraid(), drawGenerator(), drawGrid(), and save().
int BraidDrawPDF::ss [private] |
Definition at line 332 of file WordDraw.h.
Referenced by drawGenerator(), drawGrid(), posInPage(), setSS(), stripesInPage(), stripPosition(), and tableWidth().
int BraidDrawPDF::theLength [private] |
Definition at line 333 of file WordDraw.h.
Referenced by drawCompressedBraid().
string BraidDrawPDF::theTitle [private] |
Definition at line 336 of file WordDraw.h.
Referenced by drawGrid(), and stripPosition().
bool BraidDrawPDF::useCircle [private] |
Definition at line 335 of file WordDraw.h.
Referenced by drawGenerator().