HOG2
|
#include <Graphics.h>
Classes | |
struct | data |
struct | drawInfo |
struct | lineInfo |
struct | segments |
struct | shapeInfo |
struct | textInfo |
struct | triangleInfo |
Public Types | |
enum | tDrawClass { kFillRectangle, kFrameRectangle, kFillTriangle, kFrameTriangle, kFillOval, kFrameOval, kFillNGon, kFrameNGon, kLine } |
Public Member Functions | |
Display () | |
void | StartFrame () |
void | EndFrame () |
void | StartBackground () |
void | EndBackground () |
bool | BackgroundNeedsRedraw () const |
void | SetViewport (uint8_t v) |
void | SetNumViewports (uint8_t v) |
int | GetNumViewports () |
void | FrameRect (rect r, rgbColor c, float lineWidth) |
void | FillRect (rect r, rgbColor c) |
void | FrameSquare (point p, float radius, rgbColor c, float lineWidth) |
void | FillSquare (point p, float radius, rgbColor c) |
void | FrameCircle (rect r, rgbColor c, float lineWidth) |
void | FrameCircle (point r, float radius, rgbColor c, float lineWidth) |
void | FillCircle (rect r, rgbColor c) |
void | FillCircle (point p, float radius, rgbColor c) |
void | FillTriangle (point p1, point p2, point p3, rgbColor c) |
void | FrameTriangle (point p1, point p2, point p3, float lineWidth, rgbColor c) |
void | FillNGon (point p, float radius, int sides, float rotation, rgbColor c) |
void | FrameNGon (point p, float radius, float width, int sides, float rotation, rgbColor c) |
void | DrawLine (point start, point end, float lineWidth, rgbColor c) |
void | DrawLineSegments (const std::vector< point > &points, float lineWidth, rgbColor c) |
void | FillLineSegments (const std::vector< point > &points, float lineWidth, rgbColor c) |
void | DrawArrow (point start, point end, float lineWidth, rgbColor c) |
void | DrawText (const char *text, point location, rgbColor c, float height, const char *typeface=0) |
void | DrawText (const char *text, point location, rgbColor c, float height, textAlign align, const char *typeface=0) |
void | DrawText (const char *text, point location, rgbColor c, float height, textAlign align, textBaseline base, const char *typeface=0) |
Public Attributes | |
std::vector< data > | drawCommands |
std::vector< textInfo > | text |
std::vector< segments > | lineSegments |
std::vector< data > | backgroundDrawCommands |
std::vector< textInfo > | backgroundText |
std::vector< segments > | backgroundLineSegments |
uint64_t | backgroundFrame |
uint64_t | foregroundFrame |
Private Attributes | |
uint8_t | viewport |
uint8_t | numViewports |
bool | drawingBackground |
Definition at line 146 of file Graphics.h.
Enumerator | |
---|---|
kFillRectangle | |
kFrameRectangle | |
kFillTriangle | |
kFrameTriangle | |
kFillOval | |
kFrameOval | |
kFillNGon | |
kFrameNGon | |
kLine |
Definition at line 214 of file Graphics.h.
Graphics::Display::Display | ( | ) |
Definition at line 22 of file Graphics.cpp.
References backgroundFrame, drawingBackground, foregroundFrame, and numViewports.
bool Graphics::Display::BackgroundNeedsRedraw | ( | ) | const |
Definition at line 58 of file Graphics.cpp.
References backgroundFrame, and foregroundFrame.
Definition at line 193 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, and drawingBackground.
Referenced by PancakePuzzle< N >::Draw(), CanonicalGrid::CanonicalGrid::DrawArrow(), MapEnvironment::DrawArrow(), and GraphEnvironment::DrawLine().
Definition at line 184 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, and drawingBackground.
Referenced by Witness< width, height >::DoLine(), Plotting::Plot2D::Draw(), DWG::DynamicWeightedGrid< sectorSize >::Draw(), MinimalSectorAbstraction::Draw(), Hexagon::Draw(), PancakePuzzle< N >::Draw(), CanonicalGrid::CanonicalGrid::DrawBasicOrdering(), GraphEnvironment::DrawLERP(), MonoFont::DrawLine(), CanonicalGrid::CanonicalGrid::DrawLine(), MapEnvironment::DrawLine(), GraphEnvironment::DrawLine(), and CanonicalGrid::CanonicalGrid::DrawOrdering().
void Graphics::Display::DrawLineSegments | ( | const std::vector< point > & | points, |
float | lineWidth, | ||
rgbColor | c | ||
) |
Definition at line 230 of file Graphics.cpp.
References backgroundLineSegments, drawingBackground, and lineSegments.
Referenced by Plotting::Line::Draw(), CanonicalGrid::CanonicalGrid::Draw(), and MapEnvironment::Draw().
void Graphics::Display::DrawText | ( | const char * | text, |
point | location, | ||
rgbColor | c, | ||
float | height, | ||
const char * | typeface = 0 |
||
) |
Definition at line 221 of file Graphics.cpp.
References backgroundText, drawingBackground, height, text, Graphics::textAlignLeft, and Graphics::textBaselineBottom.
Referenced by TextOverlay::Draw(), Plotting::Plot2D::Draw(), Hexagon::Draw(), MNPuzzle< width, height >::Draw(), GraphEnvironment::Draw(), SnakeBird::SnakeBird::DrawLabel(), Hexagon::DrawSetup(), SnakeBird::SnakeBird::DrawSmallLabel(), CanonicalGrid::CanonicalGrid::DrawStateLabel(), MapEnvironment::DrawStateLabel(), and GraphEnvironment::DrawStateLabel().
void Graphics::Display::DrawText | ( | const char * | text, |
point | location, | ||
rgbColor | c, | ||
float | height, | ||
textAlign | align, | ||
const char * | typeface = 0 |
||
) |
Definition at line 212 of file Graphics.cpp.
References backgroundText, drawingBackground, height, text, and Graphics::textBaselineBottom.
void Graphics::Display::DrawText | ( | const char * | text, |
point | location, | ||
rgbColor | c, | ||
float | height, | ||
textAlign | align, | ||
textBaseline | base, | ||
const char * | typeface = 0 |
||
) |
Definition at line 202 of file Graphics.cpp.
References backgroundText, drawingBackground, height, and text.
void Graphics::Display::EndBackground | ( | ) |
Definition at line 53 of file Graphics.cpp.
References drawingBackground.
void Graphics::Display::EndFrame | ( | ) |
Definition at line 37 of file Graphics.cpp.
Referenced by drawGL(), and HandleFrame().
Definition at line 137 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, kFillOval, Graphics::point::x, and Graphics::point::y.
Definition at line 128 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, and kFillOval.
Referenced by Map2DSectorAbstraction::Draw(), NaryTree::Draw(), Plotting::Point::Draw(), DWG::DynamicWeightedGrid< sectorSize >::Draw(), CanonicalGrid::CanonicalGrid::Draw(), MapEnvironment::Draw(), DWG::DynamicWeightedGridEnvironment::Draw(), GraphEnvironment::Draw(), SnakeBird::SnakeBird::Draw(), Witness< width, height >::Draw(), GraphEnvironment::DrawLERP(), NaryTree::DrawLine(), SnakeBird::SnakeBird::DrawObjects(), Witness< width, height >::DrawRegionConstraint(), and SnakeBird::SnakeBird::DrawSnakeSegment().
void Graphics::Display::FillLineSegments | ( | const std::vector< point > & | points, |
float | lineWidth, | ||
rgbColor | c | ||
) |
Definition at line 239 of file Graphics.cpp.
References backgroundLineSegments, drawingBackground, and lineSegments.
Definition at line 164 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, kFillNGon, and rotation.
Referenced by SnakeBird::SnakeBird::Draw(), Witness< width, height >::Draw(), SnakeBird::SnakeBird::DrawObjects(), Witness< width, height >::DrawRegionConstraint(), and SnakeBird::SnakeBird::DrawSnakeSegment().
Definition at line 101 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, and kFillRectangle.
Referenced by Witness< width, height >::DoLine(), TextOverlay::Draw(), MapOverlay::Draw(), VoxelGrid::Draw(), Plotting::Plot2D::Draw(), CanonicalGrid::CanonicalGrid::Draw(), Hexagon::Draw(), PancakePuzzle< N >::Draw(), MNPuzzle< width, height >::Draw(), MapEnvironment::Draw(), SnakeBird::SnakeBird::Draw(), Witness< width, height >::Draw(), Witness< width, height >::DrawRegionConstraint(), DWG::DynamicWeightedGrid< sectorSize >::DrawSector(), Hexagon::DrawSetup(), MapEnvironment::DrawSingleTerrain(), and SnakeBird::SnakeBird::DrawSnakeSegment().
Definition at line 92 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, kFillRectangle, Graphics::point::x, and Graphics::point::y.
Referenced by HexagonEnvironment::Draw(), SnakeBird::SnakeBird::Draw(), Witness< width, height >::Draw(), SnakeBird::SnakeBird::DrawObjects(), DWG::DynamicWeightedGrid< sectorSize >::DrawSector(), and SnakeBird::SnakeBird::DrawSnakeSegment().
Definition at line 146 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, and kFillTriangle.
Referenced by NaryTree::Draw(), Racetrack::Draw(), Hexagon::Draw(), HexagonEnvironment::Draw(), SnakeBird::SnakeBird::Draw(), NaryTree::DrawLine(), and Hexagon::DrawSetup().
Definition at line 119 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, kFrameOval, Graphics::point::x, and Graphics::point::y.
Definition at line 110 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, and kFrameOval.
Referenced by CanonicalGrid::CanonicalGrid::Draw(), GraphEnvironment::Draw(), Witness< width, height >::Draw(), CanonicalGrid::CanonicalGrid::DrawAlternate(), and MapEnvironment::DrawAlternate().
void Graphics::Display::FrameNGon | ( | point | p, |
float | radius, | ||
float | width, | ||
int | sides, | ||
float | rotation, | ||
rgbColor | c | ||
) |
Definition at line 173 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, kFrameNGon, rotation, and width.
Definition at line 73 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, and kFrameRectangle.
Referenced by TextOverlay::Draw(), CanonicalGrid::CanonicalGrid::Draw(), PancakePuzzle< N >::Draw(), MNPuzzle< width, height >::Draw(), MapEnvironment::Draw(), and SnakeBird::SnakeBird::Draw().
Definition at line 82 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, kFrameRectangle, Graphics::point::x, and Graphics::point::y.
Referenced by SnakeBird::SnakeBird::Draw().
Definition at line 155 of file Graphics.cpp.
References backgroundDrawCommands, drawCommands, drawingBackground, and kFrameTriangle.
Referenced by Hexagon::Draw().
|
inline |
Definition at line 156 of file Graphics.h.
References numViewports.
void Graphics::Display::SetNumViewports | ( | uint8_t | v | ) |
void Graphics::Display::SetViewport | ( | uint8_t | v | ) |
Definition at line 68 of file Graphics.cpp.
Referenced by SetNumPorts(), and setViewport().
void Graphics::Display::StartBackground | ( | ) |
Definition at line 41 of file Graphics.cpp.
References backgroundDrawCommands, backgroundFrame, backgroundLineSegments, backgroundText, drawingBackground, and foregroundFrame.
void Graphics::Display::StartFrame | ( | ) |
Definition at line 29 of file Graphics.cpp.
References drawCommands, foregroundFrame, lineSegments, and text.
Referenced by drawGL().
std::vector<data> Graphics::Display::backgroundDrawCommands |
Definition at line 272 of file Graphics.h.
Referenced by DrawArrow(), DrawGraphics(), DrawLine(), FillCircle(), FillNGon(), FillRect(), FillSquare(), FillTriangle(), FrameCircle(), FrameNGon(), FrameRect(), FrameSquare(), FrameTriangle(), MakeSVG(), and StartBackground().
uint64_t Graphics::Display::backgroundFrame |
Definition at line 275 of file Graphics.h.
Referenced by BackgroundNeedsRedraw(), Display(), and StartBackground().
std::vector<segments> Graphics::Display::backgroundLineSegments |
Definition at line 274 of file Graphics.h.
Referenced by DrawGraphics(), DrawLineSegments(), FillLineSegments(), and StartBackground().
std::vector<textInfo> Graphics::Display::backgroundText |
Definition at line 273 of file Graphics.h.
Referenced by DrawGraphics(), DrawText(), and StartBackground().
std::vector<data> Graphics::Display::drawCommands |
Definition at line 268 of file Graphics.h.
Referenced by DrawArrow(), DrawGraphics(), DrawLine(), FillCircle(), FillNGon(), FillRect(), FillSquare(), FillTriangle(), FrameCircle(), FrameNGon(), FrameRect(), FrameSquare(), FrameTriangle(), MakeSVG(), and StartFrame().
|
private |
Definition at line 280 of file Graphics.h.
Referenced by Display(), DrawArrow(), DrawLine(), DrawLineSegments(), DrawText(), EndBackground(), FillCircle(), FillLineSegments(), FillNGon(), FillRect(), FillSquare(), FillTriangle(), FrameCircle(), FrameNGon(), FrameRect(), FrameSquare(), FrameTriangle(), and StartBackground().
uint64_t Graphics::Display::foregroundFrame |
Definition at line 276 of file Graphics.h.
Referenced by BackgroundNeedsRedraw(), Display(), StartBackground(), and StartFrame().
std::vector<segments> Graphics::Display::lineSegments |
Definition at line 270 of file Graphics.h.
Referenced by DrawGraphics(), DrawLineSegments(), FillLineSegments(), MakeSVG(), and StartFrame().
|
private |
Definition at line 279 of file Graphics.h.
Referenced by Display(), GetNumViewports(), and SetNumViewports().
std::vector<textInfo> Graphics::Display::text |
Definition at line 269 of file Graphics.h.
Referenced by DrawGraphics(), DrawText(), MakeSVG(), and StartFrame().
|
private |
Definition at line 278 of file Graphics.h.