4#include "flint/core/api.h"
5#include "flint/graphics/shape.h"
6#include "flint/graphics/types/color.h"
7#include "flint/math/types.h"
50 m_position.x += delta.x;
51 m_position.y += delta.y;
83 return FloatRect(m_position - m_origin, {2.0f * m_radius, 2.0f * m_radius});
94 Vec2f m_origin{0.f, 0.f};
A 2D circle rendered as a textured quad with a circle SDF shader.
float getAngle() const
Return the current rotation angle in radians.
void setOrigin(Vec2f newOrigin)
Set the local pivot point used as the rotation and positioning origin.
FLINT_API CircleShape(float radius, Color fill={255, 255, 255, 255})
Construct a circle with the given radius and fill color.
FloatRect getGlobalBounds() const override
Get the axis-aligned bounding box of the circle in world space.
FLINT_API void setRadius(float radius)
Set the circle radius.
float getRadius() const
Get the current radius in world-space units.
void move(Vec2f delta)
Translate the circle by delta.
void setAngle(float newAngle)
Set the rotation angle.
FLINT_API void emit(RenderQueue &queue) const override
Emit this drawable's rendering work for the current frame.
const Vec2f & getOrigin() const
Get the local origin pivot point.
Batches drawables into sorted geometry, primitive, and custom execution passes for GPURenderer.
Abstract base class for 2-D geometric shapes.
RGBA color with 8-bit unsigned components.