The Battle for Wesnoth  1.19.9+dev
Typedefs | Functions | Variables
cairo Namespace Reference

Typedefs

using surface_ptr = std::unique_ptr< cairo_surface_t, void(*)(cairo_surface_t *)>
 
using context_ptr = std::unique_ptr< cairo_t, void(*)(cairo_t *)>
 

Functions

surface_ptr create_surface (uint8_t *buffer, const point &size)
 
context_ptr create_context (const surface_ptr &surf)
 

Variables

constexpr cairo_format_t format = CAIRO_FORMAT_ARGB32
 Color format for cairo surfaces. More...
 

Typedef Documentation

◆ context_ptr

using cairo::context_ptr = typedef std::unique_ptr<cairo_t, void(*)(cairo_t*)>

Definition at line 25 of file cairo.hpp.

◆ surface_ptr

using cairo::surface_ptr = typedef std::unique_ptr<cairo_surface_t, void(*)(cairo_surface_t*)>

Definition at line 24 of file cairo.hpp.

Function Documentation

◆ create_context()

context_ptr cairo::create_context ( const surface_ptr surf)

Definition at line 41 of file cairo.hpp.

References surface::get(), and surf.

Referenced by font::pango_text::render().

◆ create_surface()

surface_ptr cairo::create_surface ( uint8_t *  buffer,
const point size 
)

Definition at line 30 of file cairo.hpp.

References format, and utf8::size().

Referenced by font::pango_text::render().

Variable Documentation

◆ format

constexpr cairo_format_t cairo::format = CAIRO_FORMAT_ARGB32
constexpr

Color format for cairo surfaces.

Should be equivalent to the format used by SDL.

Definition at line 28 of file cairo.hpp.

Referenced by create_surface().