15#include <egt/detail/enum.h>
16#include <egt/detail/meta.h>
29 std::shared_ptr<cairo_surface_t>;
35 std::shared_ptr<cairo_t>;
41 std::shared_ptr<cairo_pattern_t>;
47 std::shared_ptr<cairo_scaled_font_t>;
54 void operator()(cairo_t* cr) { cairo_destroy(cr); }
58struct cairo_surface_t_deleter
60 void operator()(cairo_surface_t* surface) { cairo_surface_destroy(surface); }
64struct cairo_pattern_t_deleter
66 void operator()(cairo_pattern_t* pattern) { cairo_pattern_destroy(pattern); }
74 std::unique_ptr<cairo_t, detail::cairo_t_deleter>;
80 std::unique_ptr<cairo_surface_t, detail::cairo_surface_t_deleter>;
85 std::unique_ptr<cairo_pattern_t, detail::cairo_pattern_t_deleter>;
EGT_API std::string demangle(const char *name)
Demangle a C++ symbol into something human readable.
std::string format(T value, int precision=2)
Format a float/double to a fixed precision and return as a string.
Definition detail/string.h:65
PixelFormat egt_format(uint32_t format)
Convert a DRM format to a pixel format.
cairo_format_t cairo_format(PixelFormat format)
Convert a PixelFormat to a cairo format.
std::string gstreamer_format(PixelFormat format)
Convert a pixel format to a gstreamer format.
uint32_t drm_format(PixelFormat format)
Convert a pixel format to a DRM format.
std::shared_ptr< cairo_surface_t > shared_cairo_surface_t
Shared pointer for a cairo surface.
Definition types.h:29
std::shared_ptr< cairo_t > shared_cairo_t
Shared pointer for a cairo context.
Definition types.h:35
std::unique_ptr< cairo_t, detail::cairo_t_deleter > unique_cairo_t
Unique pointer for a cairo context.
Definition types.h:74
std::unique_ptr< cairo_pattern_t, detail::cairo_pattern_t_deleter > unique_cairo_pattern_t
Unique pointer for a cairo pattern.
Definition types.h:85
std::unique_ptr< cairo_surface_t, detail::cairo_surface_t_deleter > unique_cairo_surface_t
Unique pointer for a cairo surface.
Definition types.h:80
PixelFormat
Supported pixel formats.
Definition types.h:94
@ xrgb8888
32 bpp, 24-bit color
@ rgb565
16 bpp, 16-bit color
@ argb8888
32 bpp, 24-bit color + 8-bit alpha
@ yuyv
Packed format with ½ horizontal chroma resolution, also known.
@ nv21
YUV 4:2:0 planar image, with 8 bit Y samples, followed by.
@ uyvy
Reverse byte order of YUY2.
@ invalid
Invalid color format.
EGT_API std::ostream & operator<<(std::ostream &os, const Color &color)
Overloaded std::ostream insertion operator.
std::shared_ptr< cairo_scaled_font_t > shared_cairo_scaled_font_t
Shared pointer for a cairo font.
Definition types.h:47
std::shared_ptr< cairo_pattern_t > shared_cairo_pattern_t
Shared pointer for a cairo pattern.
Definition types.h:41
EGT framework namespace.
Definition animation.h:24
When using enum_to_string() and enum_from_string(), this type needs to be defined and specialized to ...
Definition enum.h:48