#include <tb_basic_shapes.h>
Public Member Functions | |
OutlinedPolygonShape (void) | |
OutlinedPolygonShape (const OutlinedPolygonShape &other) | |
virtual | ~OutlinedPolygonShape (void) |
virtual void | ClearVertices (void) override |
void | SetFillColor (const tbGraphics::Color &fillColor) |
void | SetOutlineColor (const tbGraphics::Color &outlineColor) |
![]() | |
PolygonShape (void) | |
PolygonShape (const PolygonShape &other) | |
virtual | ~PolygonShape (void) |
![]() | |
Graphic (void) | |
Graphic (const Graphic &other) | |
virtual | ~Graphic (void) |
bool | IsActive (void) const |
void | SetActive (const bool isActive) |
void | Update (const float deltaTime) |
bool | IsVisible (void) const |
void | SetVisible (const bool isVisible) |
void | Render (void) const |
const tbMath::Vector2 & | GetPosition (void) const |
void | SetPosition (const float x, const float y) |
void | SetPosition (const tbMath::Vector2 &position) |
void | SetOrigin (const AnchorLocation &anchor) |
void | SetOrigin (const float originX, const float originY) |
float | GetDepth (void) const |
void | SetDepth (const float newDepth) |
void | SetScale (const float scale) |
void | SetScale (const float scaleX, const float scaleY) |
void | SetRotation (const float rotation) |
float | GetRotation (void) const |
void | SetScroll (const float scroll) |
void | SetScroll (const float scrollX, const float scrollY) |
bool | IsRelative (void) const |
float | GetWidth (void) const |
float | GetHeight (void) const |
Protected Member Functions | |
void | AddOutlineVertex (const tbMath::Vector2 &position) |
void | AddShapeVertex (const tbMath::Vector2 &position) |
void | AddShapeAndOutlineVertex (const tbMath::Vector2 &position) |
virtual void | OnRender (void) const override |
![]() | |
virtual PixelSpace | GetPixelWidth (void) const override |
virtual PixelSpace | GetPixelHeight (void) const override |
void | SetAsTriangles (void) |
void | SetAsTriangleFan (void) |
void | SetAsTriangleStrip (void) |
void | SetAsLines (void) |
void | SetAsLineStrip (void) |
void | SetAsLineLoop (void) |
![]() | |
virtual void | OnUpdate (const float deltaTime) |
const Color & | GetColor (void) const |
virtual void | ApplyTransform (void) const |
virtual void | PopTransform (void) const |
The OutlinedPolygonShape class extends the Polygon shape to include an outline around it along with the filled shape.
TurtleBrains::Graphics::OutlinedPolygonShape::OutlinedPolygonShape | ( | void | ) |
Constructs an empty shape with no vertices.
TurtleBrains::Graphics::OutlinedPolygonShape::OutlinedPolygonShape | ( | const OutlinedPolygonShape & | other | ) |
Constructs a polygon shape by copying the vertices and information from an existing shape.
|
virtual |
Cleans up all vertex data.
|
protected |
Adds a vertex only to the outline line loop and not the filled shape. The outline is always a line list that loops back to the first vertex.
position | The position of the vertex to add to the outlined line loop. |
|
protected |
Adds a vertex to both the outlined line loop and the filled shape. See AddOutlineVertex and AddShapeVertex() for more information.
position | The position of the vertex to add to both the outlined line loop and the filled shape. |
|
protected |
Adds a vertex only to the filled shape triangles and not the outline list.
position | The position of the vertex to add to the filled shape, behavior may depend on the mode of the polygon shape, Triangles, TriangleStrip or TriangleFan. |
|
overridevirtual |
Clears all vertices from both the filled shape and the outline.
Reimplemented from TurtleBrains::Graphics::PolygonShape.
|
overrideprotectedvirtual |
Renders the filled polygon shape first, exactly as described in PolygonShape::OnRender() then renders the outline line loop.
Reimplemented from TurtleBrains::Graphics::PolygonShape.
void TurtleBrains::Graphics::OutlinedPolygonShape::SetFillColor | ( | const tbGraphics::Color & | fillColor | ) |
This will change the color of the filled portion of the OutlinedPolygonShape, behaves exactly like PolygonShape::SetColor().
fillColor | The desired fill color. |
void TurtleBrains::Graphics::OutlinedPolygonShape::SetOutlineColor | ( | const tbGraphics::Color & | outlineColor | ) |
Change the color of the outline surrounding the shape.
outlineColor | The desired color of the outline. |