HOG2
|
Go to the source code of this file.
Functions | |
std::string | SVGGetRGB (rgbColor c) |
std::string | SVGDefineGradient (bool horizontal, bool vertical, rgbColor c1, rgbColor c2, const char *name) |
std::string | SVGFrameCircle (double x, double y, double radius, double border, rgbColor c) |
std::string | SVGDrawCircle (double x, double y, double radius, rgbColor c) |
std::string | SVGDrawRect (float x, float y, float width, float height, const char *gradient) |
std::string | SVGDrawRect (float x, float y, float width, float height, rgbColor c) |
std::string | SVGFrameRect (float x, float y, float width, float height, float border, rgbColor c) |
std::string | SVGFrameNGon (double _x, double _y, double radius, int segments, float rotation, int border, rgbColor c) |
std::string | SVGDrawNGon (double _x, double _y, double radius, int segments, float rotation, rgbColor c) |
std::string | SVGBeginLinePath (float width, rgbColor c) |
std::string | SVGAddLinePath (float x1, float y1) |
std::string | SVGAddLinePath (float x1, float y1, float x2, float y2) |
std::string | SVGEndLinePath () |
std::string | SVGDrawLineSegments (const std::vector< Graphics::point > &lines, float width, rgbColor c) |
std::string | SVGDrawLine (float x1, float y1, float x2, float y2, float width, rgbColor c) |
std::string | SVGDrawLine (int x1, int y1, int x2, int y2, int width, rgbColor c, bool center) |
std::string | SVGDrawText (float x1, float y1, const char *txt, rgbColor c, double size, const char *typeface, SVG::svgAlignment align, SVG::svgBaseline base) |
std::string | SVGDrawStrokedText (float x1, float y1, const char *txt, rgbColor c, rgbColor strokeColor, double size) |
float | WidthToSVG (float w, float xMultiplier, float yMultiplier) |
float | PointToSVG (float p, float multiplier) |
void | PointToSVG (Graphics::point &p, float xmultiplier, float ymultiplier) |
void | HandleCommand (const std::vector< Graphics::Display::data > &drawCommands, std::string &s, int width, int height, int viewport) |
void | MakeSVG (const Graphics::Display &disp, const char *filename, int width, int height, int viewport, const char *comment, bool crisp) |
std::string | MakeSVG (const Graphics::Display &disp, int width, int height, int viewport, const char *comment, bool crisp) |
void HandleCommand | ( | const std::vector< Graphics::Display::data > & | drawCommands, |
std::string & | s, | ||
int | width, | ||
int | height, | ||
int | viewport | ||
) |
Definition at line 294 of file SVGUtil.cpp.
References Graphics::Display::lineInfo::arrow, Graphics::rect::bottom, Graphics::Display::drawInfo::c, Graphics::Display::triangleInfo::c, Graphics::Display::shapeInfo::c, Graphics::Display::shapeInfo::center, Graphics::Display::lineInfo::end, height, Graphics::Display::kFillNGon, Graphics::Display::kFillOval, Graphics::Display::kFillRectangle, Graphics::Display::kFillTriangle, Graphics::Display::kFrameNGon, Graphics::Display::kFrameOval, Graphics::Display::kFrameRectangle, Graphics::Display::kFrameTriangle, Graphics::Display::kLine, Graphics::rect::left, Graphics::point::normalise(), Graphics::Display::triangleInfo::p1, Graphics::Display::triangleInfo::p2, Graphics::Display::triangleInfo::p3, PointToSVG(), Graphics::Display::drawInfo::r, Graphics::Display::shapeInfo::radius, Graphics::rect::right, Graphics::Display::shapeInfo::rotate, Graphics::Display::shapeInfo::segments, Graphics::Display::lineInfo::start, SVGAddLinePath(), SVGBeginLinePath(), SVGDrawCircle(), SVGDrawNGon(), SVGDrawRect(), SVGEndLinePath(), SVGFrameCircle(), SVGFrameNGon(), SVGFrameRect(), SVGGetRGB(), to_string_with_precision(), Graphics::rect::top, width, Graphics::Display::drawInfo::width, Graphics::Display::triangleInfo::width, WidthToSVG(), Graphics::point::x, Graphics::point::y, and Graphics::point::z.
Referenced by MakeSVG().
void MakeSVG | ( | const Graphics::Display & | disp, |
const char * | filename, | ||
int | width, | ||
int | height, | ||
int | viewport, | ||
const char * | comment, | ||
bool | crisp | ||
) |
std::string MakeSVG | ( | const Graphics::Display & | disp, |
int | width, | ||
int | height, | ||
int | viewport, | ||
const char * | comment, | ||
bool | crisp | ||
) |
Definition at line 502 of file SVGUtil.cpp.
References Graphics::Display::backgroundDrawCommands, Graphics::Display::drawCommands, HandleCommand(), height, SVG::kCenter, SVG::kLeft, SVG::kRight, Graphics::Display::lineSegments, PointToSVG(), SVGDrawLineSegments(), SVGDrawText(), Graphics::Display::text, Graphics::textAlignCenter, Graphics::textAlignLeft, width, and WidthToSVG().
float PointToSVG | ( | float | p, |
float | multiplier | ||
) |
Definition at line 282 of file SVGUtil.cpp.
Referenced by HandleCommand(), and MakeSVG().
void PointToSVG | ( | Graphics::point & | p, |
float | xmultiplier, | ||
float | ymultiplier | ||
) |
Definition at line 287 of file SVGUtil.cpp.
References Graphics::point::x, and Graphics::point::y.
std::string SVGAddLinePath | ( | float | x1, |
float | y1 | ||
) |
Definition at line 162 of file SVGUtil.cpp.
Referenced by HandleCommand().
std::string SVGAddLinePath | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2 | ||
) |
Definition at line 167 of file SVGUtil.cpp.
std::string SVGBeginLinePath | ( | float | width, |
rgbColor | c | ||
) |
Definition at line 147 of file SVGUtil.cpp.
References SVGGetRGB(), and width.
Referenced by HandleCommand().
std::string SVGDefineGradient | ( | bool | horizontal, |
bool | vertical, | ||
rgbColor | c1, | ||
rgbColor | c2, | ||
const char * | name | ||
) |
Definition at line 34 of file SVGUtil.cpp.
References SVGGetRGB().
Referenced by MapOverlay::SVGDraw().
std::string SVGDrawCircle | ( | double | x, |
double | y, | ||
double | radius, | ||
rgbColor | c | ||
) |
Definition at line 60 of file SVGUtil.cpp.
References SVGGetRGB(), and to_string_with_precision().
Referenced by HandleCommand(), BidirectionalProblemAnalyzer< state, action, environment >::SaveSVG(), CanonicalGrid::CanonicalGrid::SVGDraw(), and GraphEnvironment::SVGDraw().
std::string SVGDrawLine | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2, | ||
float | width, | ||
rgbColor | c | ||
) |
Definition at line 192 of file SVGUtil.cpp.
References SVGGetRGB(), and width.
Referenced by BidirectionalProblemAnalyzer< state, action, environment >::SaveSVG(), MapOverlay::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDraw(), MapEnvironment::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDrawLine(), and MapEnvironment::SVGDrawLine().
std::string SVGDrawLine | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | width, | ||
rgbColor | c, | ||
bool | center | ||
) |
Definition at line 204 of file SVGUtil.cpp.
References SVGGetRGB(), and width.
std::string SVGDrawLineSegments | ( | const std::vector< Graphics::point > & | lines, |
float | width, | ||
rgbColor | c | ||
) |
Definition at line 176 of file SVGUtil.cpp.
References SVGGetRGB(), and width.
Referenced by MakeSVG().
std::string SVGDrawNGon | ( | double | _x, |
double | _y, | ||
double | radius, | ||
int | segments, | ||
float | rotation, | ||
rgbColor | c | ||
) |
Definition at line 127 of file SVGUtil.cpp.
References rotation, SVGGetRGB(), to_string_with_precision(), and TWOPI.
Referenced by HandleCommand().
std::string SVGDrawRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height, | ||
const char * | gradient | ||
) |
Definition at line 74 of file SVGUtil.cpp.
Referenced by HandleCommand(), MapOverlay::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDraw(), and MapEnvironment::SVGDraw().
std::string SVGDrawRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height, | ||
rgbColor | c | ||
) |
Definition at line 88 of file SVGUtil.cpp.
References height, SVGGetRGB(), to_string_with_precision(), and width.
std::string SVGDrawStrokedText | ( | float | x1, |
float | y1, | ||
const char * | txt, | ||
rgbColor | c, | ||
rgbColor | strokeColor, | ||
double | size | ||
) |
Definition at line 266 of file SVGUtil.cpp.
References SVGGetRGB().
std::string SVGDrawText | ( | float | x1, |
float | y1, | ||
const char * | txt, | ||
rgbColor | c, | ||
double | size, | ||
const char * | typeface, | ||
SVG::svgAlignment | align, | ||
SVG::svgBaseline | base | ||
) |
Definition at line 227 of file SVGUtil.cpp.
References SVG::kBottom, SVG::kCenter, SVG::kLeft, SVG::kMiddle, SVG::kRight, SVG::kTop, and SVGGetRGB().
Referenced by MakeSVG(), BidirectionalProblemAnalyzer< state, action, environment >::SaveSVG(), MapOverlay::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGLabelState(), MapEnvironment::SVGLabelState(), and GraphEnvironment::SVGLabelState().
std::string SVGEndLinePath | ( | ) |
Definition at line 172 of file SVGUtil.cpp.
Referenced by HandleCommand().
std::string SVGFrameCircle | ( | double | x, |
double | y, | ||
double | radius, | ||
double | border, | ||
rgbColor | c | ||
) |
Definition at line 51 of file SVGUtil.cpp.
References SVGGetRGB(), and to_string_with_precision().
Referenced by HandleCommand(), and BidirectionalProblemAnalyzer< state, action, environment >::SaveSVG().
std::string SVGFrameNGon | ( | double | _x, |
double | _y, | ||
double | radius, | ||
int | segments, | ||
float | rotation, | ||
int | border, | ||
rgbColor | c | ||
) |
Definition at line 110 of file SVGUtil.cpp.
References rotation, to_string_with_precision(), and TWOPI.
Referenced by HandleCommand().
std::string SVGFrameRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height, | ||
float | border, | ||
rgbColor | c | ||
) |
Definition at line 99 of file SVGUtil.cpp.
References height, SVGGetRGB(), to_string_with_precision(), and width.
Referenced by HandleCommand(), MapOverlay::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGDraw(), MapEnvironment::SVGDraw(), CanonicalGrid::CanonicalGrid::SVGFrameRect(), and MapEnvironment::SVGFrameRect().
std::string SVGGetRGB | ( | rgbColor | c | ) |
Definition at line 25 of file SVGUtil.cpp.
References rgbColor::b, rgbColor::g, and rgbColor::r.
Referenced by HandleCommand(), SVGBeginLinePath(), SVGDefineGradient(), SVGDrawCircle(), SVGDrawLine(), SVGDrawLineSegments(), SVGDrawNGon(), SVGDrawRect(), SVGDrawStrokedText(), SVGDrawText(), SVGFrameCircle(), and SVGFrameRect().
float WidthToSVG | ( | float | w, |
float | xMultiplier, | ||
float | yMultiplier | ||
) |
Definition at line 277 of file SVGUtil.cpp.
References min().
Referenced by HandleCommand(), and MakeSVG().