Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <font.h>
Public Member Functions | |
float | size (void) const |
void | setSize (float s) |
float | strokeWeight (void) const |
void | setStrokeWeight (float w) |
float | drawChar (char c) const |
double | charWidth (char c) const |
double | stringWidth (const std::string &str) const |
double | verticalScaling (void) const |
double | horizontalScaling (void) const |
Font (float newsize=.1, float weight=NORMAL_STROKE) | |
double | strokeWidth (void) const |
bool | operator== (const Font &other) |
bool | operator!= (const Font &other) |
Protected Member Functions | |
void | calcMetrics (void) |
void | calcMetricsIfNeeded (void) const |
Protected Attributes | |
float | m_size |
float | m_strokeWeight |
bool | m_needMetrics |
double | m_strokeWidth |
double | m_extraCharWidth |
double | m_spaceCharFixup |
double | m_verticalScaling |
double | m_horizontalScaling |
|
inline |
|
protected |
Definition at line 50 of file font.cpp.
References g_game, guiMax, m_extraCharWidth, m_horizontalScaling, m_needMetrics, m_spaceCharFixup, m_strokeWidth, m_verticalScaling, REFERENCE_LINE_SPACING, size(), SPACE_CHAR, strokeWeight(), useStroke(), game_data_t::x_resolution, and game_data_t::y_resolution.
Referenced by calcMetricsIfNeeded().
|
protected |
Definition at line 96 of file font.cpp.
References calcMetrics(), and m_needMetrics.
Referenced by charWidth(), drawChar(), horizontalScaling(), stringWidth(), strokeWidth(), and verticalScaling().
double Font::charWidth | ( | char | c) | const |
Definition at line 124 of file font.cpp.
References calcMetricsIfNeeded(), GLUT_WIDTH_HACK, m_extraCharWidth, m_spaceCharFixup, size(), SPACE_CHAR, and useStroke().
Referenced by PaintText::addFragment(), PaintText::parseFragmentsWithCharBreak(), PaintText::parseFragmentsWithWordBreak(), and stringWidth().
float Font::drawChar | ( | char | c) | const |
Definition at line 106 of file font.cpp.
References calcMetricsIfNeeded(), m_extraCharWidth, m_spaceCharFixup, SPACE_CHAR, and useStroke().
Referenced by drawChars().
double Font::horizontalScaling | ( | void | ) | const |
Definition at line 170 of file font.cpp.
References calcMetricsIfNeeded(), and m_horizontalScaling.
Referenced by PaintText::calcLayout().
Definition at line 105 of file font.h.
References m_size, and m_strokeWeight.
|
inline |
Definition at line 57 of file font.h.
References m_needMetrics, and m_size.
|
inline |
Definition at line 68 of file font.h.
References m_needMetrics, and m_strokeWeight.
|
inline |
Definition at line 53 of file font.h.
References m_size.
Referenced by PaintText::calcLayout(), calcMetrics(), charWidth(), and Picker::totalCellHeight().
double Font::stringWidth | ( | const std::string & | str) | const |
Definition at line 142 of file font.cpp.
References calcMetricsIfNeeded(), charWidth(), and i.
Referenced by PaintText::parseFragmentsWithCharBreak().
|
inline |
double Font::strokeWidth | ( | void | ) | const |
Definition at line 154 of file font.cpp.
References calcMetricsIfNeeded(), and m_strokeWidth.
Referenced by drawChars().
double Font::verticalScaling | ( | void | ) | const |
Definition at line 162 of file font.cpp.
References calcMetricsIfNeeded(), and m_verticalScaling.
Referenced by PaintText::calcLayout().
|
protected |
Definition at line 132 of file font.h.
Referenced by calcMetrics(), charWidth(), and drawChar().
|
protected |
Definition at line 135 of file font.h.
Referenced by calcMetrics(), and horizontalScaling().
|
protected |
Definition at line 130 of file font.h.
Referenced by calcMetrics(), calcMetricsIfNeeded(), setSize(), and setStrokeWeight().
|
protected |
Definition at line 126 of file font.h.
Referenced by operator==(), setSize(), and size().
|
protected |
Definition at line 133 of file font.h.
Referenced by calcMetrics(), charWidth(), and drawChar().
|
protected |
Definition at line 127 of file font.h.
Referenced by operator==(), setStrokeWeight(), and strokeWeight().
|
protected |
Definition at line 131 of file font.h.
Referenced by calcMetrics(), and strokeWidth().
|
protected |
Definition at line 134 of file font.h.
Referenced by calcMetrics(), and verticalScaling().