14#include <egt/detail/meta.h>
15#include <egt/geometry.h>
100 EGT_NODISCARD
Image render(const std::
string&
id = {},
const RectF& rect = {})
const;
117 return this->render(
id, id_box(
id));
141 EGT_NODISCARD
bool id_exists(
const std::string&
id)
const;
169 void uri(
const std::string& uri);
Raster image resource used for drawing or displaying.
Definition image.h:39
A rectangle with a point and a size.
Definition geometry.h:595
An SVG image.
Definition svgimage.h:57
SizeF m_size
User set size.
Definition svgimage.h:190
SvgImage(const SvgImage &)=delete
EGT_NODISCARD shared_cairo_surface_t do_render(const std::string &id={}, const RectF &rect={}) const
Render and return a new surface.
std::unique_ptr< SvgImpl > m_impl
Implementation pointer.
Definition svgimage.h:184
void load()
Load the SVG file.
std::string m_uri
User set URI.
Definition svgimage.h:193
void uri(const std::string &uri)
Set the URI.
SvgImage(const std::string &uri, const SizeF &size={})
void size(const SizeF &size)
Set the size you want any rendered Image to be.
Definition svgimage.h:158
EGT_NODISCARD RectF id_box(const std::string &id) const
Get the position and size of an element in the SVG.
EGT_NODISCARD bool id_exists(const std::string &id) const
Test if an element exists in the SVG image.
EGT_NODISCARD Image id_image(const std::string &id) const
Render the image of the specific element in the SVG file.
Definition svgimage.h:115
SvgImage(SvgImage &&) noexcept
EGT_NODISCARD SizeF size() const
Get the SVG size.
SvgImage & operator=(const SvgImage &)=delete
std::shared_ptr< cairo_surface_t > shared_cairo_surface_t
Shared pointer for a cairo surface.
Definition types.h:29
EGT framework namespace.
Definition animation.h:24