Board 0.9.6
Classes | Enumerations | Functions | Variables
LibBoard::Tools Namespace Reference

Classes

struct  EuclideanLine
 
class  MessageStream
 

Enumerations

enum  CaseSensitivity { CaseSensitive , CaseInsensitive }
 

Functions

std::vector< PointpathBoundaryPoints (const Path &path, double strokeWidth, LineCap lineCap, LineJoin lineJoin, double miterLimit=4.0)
 
Rect pathBoundingBox (const Path &path, double strokeWidth, LineCap lineCap, LineJoin lineJoin, double miterLimit=4.0)
 
void secured_strncpy (char *dst, const char *src, size_t count)
 
void secured_ctime (char *str, const time_t *t, size_t count)
 
bool base64encode (std::istream &in, std::ostream &, int linesize=80)
 
bool stringEndsWith (const char *str, const char *end, CaseSensitivity sensitivity=CaseSensitive)
 
void flushFile (const char *filename, std::ostream &out)
 
void getEPSBoundingBox (const char *filename, Rect &rect)
 
bool canCreateFile (const char *filename)
 
bool canReadFile (const char *filename)
 
const char * temporaryFilename (const char *extension)
 
void initBoardRand (unsigned long seed)
 
unsigned int boardRand ()
 
double boardRandDouble ()
 
double boardRandDouble (double min, double max)
 
bool almostEqual (const double &a, const double &b)
 
double mix (const double &a, const double &b, const double &time)
 
template<typename T >
void unused (const T &,...)
 
template<typename T >
void clamp (T &value, const T &min, const T &max)
 
template<typename T >
square (const T &t)
 
bool solveQuadratic (double a, double b, double c, double &x1, double &x2)
 
double rad2deg (double angle)
 
double deg2rad (double angle)
 
bool isASharpCorner (Point p1, Point p2, Point p3)
 
double sharpCornerAngle (Point p1, Point p2, Point p3)
 
Point intersection (EuclideanLine l1, EuclideanLine l2)
 
Point exteriorMiterIntersection (Point p1, Point p2, Point p3, double strokeWidth)
 
Point interiorMiterIntersection (Point p1, Point p2, Point p3, double strokeWidth)
 
void exteriorBevelIntersection (Point p1, Point p2, Point p3, double strokeWidth, Point &a, Point &b)
 
std::vector< PointexteriorRoundIntersection (Point p1, Point p2, Point p3, double strokeWidth)
 
void butCapExtremities (Point p1, Point p2, double strokeWidth, Point &a, Point &b)
 
void squareCapExtremities (Point p1, Point p2, double strokeWidth, Point &a, Point &b)
 
std::vector< PointroundCapExtremities (Point p1, Point p2, double strokeWidth)
 

Variables

MessageStream error
 
MessageStream warning
 
MessageStream notice
 

Enumeration Type Documentation

◆ CaseSensitivity

Enumerator
CaseSensitive 
CaseInsensitive 

Function Documentation

◆ almostEqual()

bool LibBoard::Tools::almostEqual ( const double &  a,
const double &  b 
)
inline

◆ base64encode()

bool LibBoard::Tools::base64encode ( std::istream &  in,
std::ostream &  out,
int  linesize = 80 
)

◆ boardRand()

unsigned int LibBoard::Tools::boardRand ( )

◆ boardRandDouble() [1/2]

double LibBoard::Tools::boardRandDouble ( )

◆ boardRandDouble() [2/2]

double LibBoard::Tools::boardRandDouble ( double  min,
double  max 
)

References boardRand().

◆ butCapExtremities()

void LibBoard::Tools::butCapExtremities ( Point  p1,
Point  p2,
double  strokeWidth,
Point a,
Point b 
)

◆ canCreateFile()

bool LibBoard::Tools::canCreateFile ( const char *  filename)

Referenced by temporaryFilename().

◆ canReadFile()

bool LibBoard::Tools::canReadFile ( const char *  filename)

Referenced by temporaryFilename().

◆ clamp()

template<typename T >
void LibBoard::Tools::clamp ( T &  value,
const T &  min,
const T &  max 
)

◆ deg2rad()

double LibBoard::Tools::deg2rad ( double  angle)
inline

References M_PI.

◆ exteriorBevelIntersection()

void LibBoard::Tools::exteriorBevelIntersection ( Point  p1,
Point  p2,
Point  p3,
double  strokeWidth,
Point a,
Point b 
)

◆ exteriorMiterIntersection()

Point LibBoard::Tools::exteriorMiterIntersection ( Point  p1,
Point  p2,
Point  p3,
double  strokeWidth 
)

◆ exteriorRoundIntersection()

std::vector< Point > LibBoard::Tools::exteriorRoundIntersection ( Point  p1,
Point  p2,
Point  p3,
double  strokeWidth 
)

◆ flushFile()

void LibBoard::Tools::flushFile ( const char *  filename,
std::ostream &  out 
)

◆ getEPSBoundingBox()

void LibBoard::Tools::getEPSBoundingBox ( const char *  filename,
Rect rect 
)

◆ initBoardRand()

void LibBoard::Tools::initBoardRand ( unsigned long  seed)

Referenced by main().

◆ interiorMiterIntersection()

Point LibBoard::Tools::interiorMiterIntersection ( Point  p1,
Point  p2,
Point  p3,
double  strokeWidth 
)

◆ intersection()

Point LibBoard::Tools::intersection ( EuclideanLine  l1,
EuclideanLine  l2 
)

◆ isASharpCorner()

bool LibBoard::Tools::isASharpCorner ( Point  p1,
Point  p2,
Point  p3 
)

Referenced by pathBoundaryPoints().

◆ mix()

double LibBoard::Tools::mix ( const double &  a,
const double &  b,
const double &  time 
)
inline

Referenced by LibBoard::mix().

◆ pathBoundaryPoints()

std::vector< Point > LibBoard::Tools::pathBoundaryPoints ( const Path path,
double  strokeWidth,
LineCap  lineCap,
LineJoin  lineJoin,
double  miterLimit = 4.0 
)

◆ pathBoundingBox()

Rect LibBoard::Tools::pathBoundingBox ( const Path path,
double  strokeWidth,
LineCap  lineCap,
LineJoin  lineJoin,
double  miterLimit = 4.0 
)

◆ rad2deg()

double LibBoard::Tools::rad2deg ( double  angle)
inline

References M_PI.

◆ roundCapExtremities()

std::vector< Point > LibBoard::Tools::roundCapExtremities ( Point  p1,
Point  p2,
double  strokeWidth 
)

◆ secured_ctime()

void LibBoard::Tools::secured_ctime ( char *  str,
const time_t *  t,
size_t  count 
)
inline

◆ secured_strncpy()

void LibBoard::Tools::secured_strncpy ( char *  dst,
const char *  src,
size_t  count 
)
inline

Referenced by main().

◆ sharpCornerAngle()

double LibBoard::Tools::sharpCornerAngle ( Point  p1,
Point  p2,
Point  p3 
)

Referenced by pathBoundaryPoints().

◆ solveQuadratic()

bool LibBoard::Tools::solveQuadratic ( double  a,
double  b,
double  c,
double &  x1,
double &  x2 
)

◆ square()

template<typename T >
T LibBoard::Tools::square ( const T &  t)
inline

Referenced by LibBoard::hachures().

◆ squareCapExtremities()

void LibBoard::Tools::squareCapExtremities ( Point  p1,
Point  p2,
double  strokeWidth,
Point a,
Point b 
)

◆ stringEndsWith()

bool LibBoard::Tools::stringEndsWith ( const char *  str,
const char *  end,
CaseSensitivity  sensitivity = CaseSensitive 
)

◆ temporaryFilename()

const char * LibBoard::Tools::temporaryFilename ( const char *  extension)

◆ unused()

template<typename T >
void LibBoard::Tools::unused ( const T &  ,
  ... 
)
inline

Variable Documentation

◆ error

LibBoard::Tools::MessageStream LibBoard::Tools::error
extern

◆ notice

LibBoard::Tools::MessageStream LibBoard::Tools::notice
extern

Referenced by main().

◆ warning

LibBoard::Tools::MessageStream LibBoard::Tools::warning
extern