26#include "GraphicsApi.h"
28#include "Transformable.h"
30#include "VertexArray.h"
31#include "VertexBuffer.h"
34#ifndef DOXYGEN_SHOULD_SKIP_THIS
146 return m_outlineColor;
168 return m_outlineThickness;
266 void updateOutline();
267 void updateOutlineColors();
269 void computeVertices(
VertexArray& vertices,
float halfWidth);
280 float m_outlineThickness;
284#ifndef DOXYGEN_SHOULD_SKIP_THIS
A curve is a one dimension object.
Definition: Curve.h:52
VertexBuffer commitGeometry() const
Create a buffer with the current geometry.
virtual void draw(RenderTarget &target, const RenderStates &states) override
Draw the object to a render target.
const Color4f & getColor() const
Get the fill color of the curve.
Definition: Curve.h:107
Type
The type of the curve.
Definition: Curve.h:57
@ Simple
A simple curve with no outline.
Definition: Curve.h:58
@ Outlined
An outlined curve.
Definition: Curve.h:59
void updateGeometry()
Recompute the internal geometry of the curve.
RectF getLocalBounds() const
Get the local bounding rectangle of the entity.
void setColor(const Color4f &color)
Set the fill color of the curve.
void setWidth(float width)
Set the width of the curve.
Curve()
Default constructor.
float getOutlineThickness() const
Get the outline thickness of the curve.
Definition: Curve.h:167
const Color4f & getOutlineColor() const
Get the outline color of the curve.
Definition: Curve.h:145
float getWidth() const
Get the width of the curve.
Definition: Curve.h:123
virtual Vector2f getPoint(std::size_t index) const =0
Get a point of the curve.
VertexBuffer commitOutlineGeometry() const
Create a buffer with the current outline geometry.
Type getType() const noexcept
Return the type of the curve.
Definition: Curve.h:81
void setClosed(bool closed=true)
Set the curve closed.
void setOutlineThickness(float thickness)
Set the thickness of the curve's outline.
void setOutlineColor(const Color4f &color)
Set the outline color of the curve.
virtual std::size_t getPointCount() const =0
Get the total number of points of the curve.
void setAnchor(Anchor anchor)
Set the anchor origin of the entity.
void setType(Type type)
Set the type of the curve.
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
A set of primitives.
Definition: VertexArray.h:65
Data in the graphics memory.
Definition: VertexBuffer.h:81
Anchor
An anchor of a box.
Definition: Anchor.h:38
The namespace for gf classes.
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
A 4D vector.
Definition: Vector.h:852