5#include <aegis2d/render/export.hpp>
63 std::size_t count = 0,
int spacing = 0);
67 [[nodiscard]] std::size_t
size() const noexcept;
83 [[nodiscard]]
Rect source(
std::
size_t index) const;
How a texture is cut into frames, numbered from 0.
Definition sprite_sheet.hpp:37
std::size_t size() const noexcept
Number of frames.
static SpriteSheet grid(TextureSize texture, TextureSize frame, std::size_t count=0, int spacing=0)
Frames of the same size laid out in a grid, numbered left to right, then top to bottom.
SpriteSheet(TextureSize texture, std::vector< PixelRect > frames)
Frames at the given rectangles, for sheets packed by hand or by a tool.
SpriteSheet(TextureSize texture)
A sheet whose only frame is the whole texture.
OpenGL renderer: sprites, text and camera (client only).
Definition bitmap_font.hpp:16
Definition endpoint.hpp:85
Backend-independent renderer interface and the sprite it draws.
Rectangle of a texture, in whole pixels from its top-left corner.
Definition sprite_sheet.hpp:14
friend constexpr bool operator==(const PixelRect &, const PixelRect &) noexcept=default
Compares the rectangles.
int y
Top edge.
Definition sprite_sheet.hpp:18
int height
Height, above 0.
Definition sprite_sheet.hpp:22
int width
Width, above 0.
Definition sprite_sheet.hpp:20
int x
Left edge.
Definition sprite_sheet.hpp:16
Axis-aligned rectangle.
Definition renderer.hpp:20
Width and height of a texture, in pixels.
Definition renderer.hpp:38