27 #include "GraphicsApi.h" 28 #include "Transformable.h" 29 #include "VertexArray.h" 30 #include "VertexBuffer.h" 33 #ifndef DOXYGEN_SHOULD_SKIP_THIS 98 [[deprecated(
"You should use setTexture(const Texture&, const RectF&) instead")]]
99 void setTexture(
const Texture& texture,
bool resetRect);
141 return m_texture !=
nullptr;
165 void setTextureRect(
const RectF& rect);
175 return m_textureRect;
194 void setColor(
const Color4f& color);
216 void setOutlineColor(
const Color4f& color);
226 return m_outlineColor;
238 void setOutlineThickness(
float thickness);
247 return m_outlineThickness;
256 virtual std::size_t getPointCount()
const = 0;
273 virtual Vector2f getPoint(std::size_t index)
const = 0;
286 RectF getLocalBounds()
const;
298 void setAnchor(
Anchor anchor);
331 void updateGeometry();
338 void updateBounds(
RectF bounds);
343 void updateAutoBounds();
347 void updateTexCoords();
348 void updateOutline();
349 void updateOutlineColors();
359 float m_outlineThickness;
363 #ifndef DOXYGEN_SHOULD_SKIP_THIS
Base class for textured shapes with outline.
Definition: Shape.h:73
A set of primitives.
Definition: VertexArray.h:65
const Color4f & getOutlineColor() const
Get the outline color of the shape.
Definition: Shape.h:225
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
static constexpr Rect< float > fromSize(Vector< float, 2 > size) noexcept
Create a rectangle from a size.
Definition: Rect.h:129
Data in the graphics memory.
Definition: VertexBuffer.h:81
A texture for colored images.
Definition: Texture.h:313
float getOutlineThickness() const
Get the outline thickness of the shape.
Definition: Shape.h:246
The namespace for gf classes.
Definition: Action.h:35
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the shape.
Definition: Shape.h:174
A 4D vector.
Definition: Vector.h:852
const Texture & getTexture() const
Get the source texture of the shape.
Definition: Shape.h:129
bool hasTexture() const
Check if a texture is set.
Definition: Shape.h:140
Anchor
An anchor of a box.
Definition: Anchor.h:38
const Color4f & getColor() const
Get the fill color of the shape.
Definition: Shape.h:203
General purpose math vector.
Definition: Vector.h:61