QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RShxFont Class Reference

#include <RShxFont.h>

Inheritance diagram for RShxFont:
RFont

Classes

struct  EscapeRange
 
struct  ShxLine
 
struct  ShxPoint
 

Public Types

enum  Type { Unifont , Bigfont , Shapes , Regfont }
 

Public Member Functions

bool isEscapeChar (QChar ch)
 
virtual bool load () override
 
 RShxFont (const QString &fileName)
 
- Public Member Functions inherited from RFont
const QStringList getAuthors () const
 
QList< double > getAuxLinePositions () const
 
QString getAuxLinePositionsString () const
 
QString getEncoding () const
 
QString getFileName () const
 
RPainterPath getGlyph (const QChar &ch, bool draft=false) const
 
QMap< QChar, RPainterPathgetGlyphMap () const
 
QList< QChar > getGlyphNames () const
 
double getLetterSpacing () const
 
double getLineSpacingFactor () const
 
const QStringList getNames () const
 
RPainterPath getShape (const QString &name) const
 
QString getShapeName (const QChar &ch) const
 
QList< QString > getShapeNames () const
 
double getWordSpacing () const
 
bool isLoaded () const
 
bool isValid () const
 
bool load ()
 Loads the font into memory.
 
 RFont ()
 Copyright (c) 2011-2018 by Andrew Mustun.
 
 RFont (const QString &fileName)
 Constructor.
 
 ~RFont ()
 

Protected Member Functions

bool calCRFromSEH (double startX, double startY, double endX, double endY, double chordHeight, double &centerX, double &centerY, double &radius)
 
bool caseCode8 (char *&buf, int &len)
 
bool caseCodeC (char *&buf, int &len)
 
void drawArc (double CenterX, double CenterY, double radius, double startAng, double sweepAng)
 
void drawLine ()
 
void endLine ()
 
void parseDef (uint16_t ch, char *buf, int len)
 
void parseLenDirByte (uint8_t code)
 
void parseOneCode (char *&buf, int &len)
 
QString readLine (FILE *pf)
 
void startLine ()
 

Protected Attributes

bool containsArcs
 
ShxLine curLine
 
QString desc
 
bool drawMode
 
uint16_t indexCount
 
std::vector< uint16_t > indexes
 
std::vector< ShxLinelines
 
std::stack< double > penPosition
 
double penX
 
double penY
 
uint16_t rangeCount
 
std::vector< EscapeRangeranges
 
double scale
 
Type type
 

Member Enumeration Documentation

◆ Type

Enumerator
Unifont 
Bigfont 
Shapes 
Regfont 

Constructor & Destructor Documentation

◆ RShxFont()

RShxFont::RShxFont ( const QString & fileName)

Member Function Documentation

◆ calCRFromSEH()

bool RShxFont::calCRFromSEH ( double startX,
double startY,
double endX,
double endY,
double chordHeight,
double & centerX,
double & centerY,
double & radius )
protected

◆ caseCode8()

bool RShxFont::caseCode8 ( char *& buf,
int & len )
protected

◆ caseCodeC()

bool RShxFont::caseCodeC ( char *& buf,
int & len )
protected

◆ drawArc()

void RShxFont::drawArc ( double CenterX,
double CenterY,
double radius,
double startAng,
double sweepAng )
protected

◆ drawLine()

void RShxFont::drawLine ( )
protected

◆ endLine()

void RShxFont::endLine ( )
protected

◆ isEscapeChar()

bool RShxFont::isEscapeChar ( QChar ch)

◆ load()

bool RShxFont::load ( )
overridevirtual

◆ parseDef()

void RShxFont::parseDef ( uint16_t ch,
char * buf,
int len )
protected

◆ parseLenDirByte()

void RShxFont::parseLenDirByte ( uint8_t code)
protected

◆ parseOneCode()

void RShxFont::parseOneCode ( char *& buf,
int & len )
protected

◆ readLine()

QString RShxFont::readLine ( FILE * pf)
protected

◆ startLine()

void RShxFont::startLine ( )
protected

Member Data Documentation

◆ containsArcs

bool RShxFont::containsArcs
protected

◆ curLine

ShxLine RShxFont::curLine
protected

◆ desc

QString RShxFont::desc
protected

◆ drawMode

bool RShxFont::drawMode
protected

◆ indexCount

uint16_t RShxFont::indexCount
protected

◆ indexes

std::vector<uint16_t> RShxFont::indexes
protected

◆ lines

std::vector<ShxLine> RShxFont::lines
protected

◆ penPosition

std::stack<double> RShxFont::penPosition
protected

◆ penX

double RShxFont::penX
protected

◆ penY

double RShxFont::penY
protected

◆ rangeCount

uint16_t RShxFont::rangeCount
protected

◆ ranges

std::vector<EscapeRange> RShxFont::ranges
protected

◆ scale

double RShxFont::scale
protected

◆ type

Type RShxFont::type
protected

The documentation for this class was generated from the following files: