23
#ifndef CAIROGRAPHICS_H
24
#define CAIROGRAPHICS_H
27
#include "BitmapFormats.h"
28
#include "ImageSurface.h"
32
//! A cairo graphics container
34
CairoGraphics encapsulates a cairo surface and context.
39
CairoGraphics(cairo_format_t format, int width, int height);
42
//! Return a cairo context to the encapsulated surface.
44
@return A cairo context.
46
cairo_t* GetContext();
47
//! Create a NBitmapData pointer to a 2D texture data.
49
The returned data must be destroyed with delete.
50
@return A pointer to a 2D texture data.
52
NBitmapData* GetBitmap();
55
//! Cairo surface format
56
cairo_format_t m_surface_format;
58
cairo_surface_t* m_cairo_surface;
59
int m_width; //!< Surface width.
60
int m_height; //!< Surface height.
65
#endif // CAIROGRAPHICS_H
23
#ifndef CAIROGRAPHICS_H
24
#define CAIROGRAPHICS_H
27
#include "BitmapFormats.h"
28
#include "ImageSurface.h"
32
//! A cairo graphics container
34
CairoGraphics encapsulates a cairo surface and context.
39
CairoGraphics(cairo_format_t format, int width, int height);
42
//! Return a cairo context to the encapsulated surface.
44
@return A cairo context.
46
cairo_t* GetContext();
47
//! Create a NBitmapData pointer to a 2D texture data.
49
The returned data must be destroyed with delete.
50
@return A pointer to a 2D texture data.
52
NBitmapData* GetBitmap();
55
//! Cairo surface format
56
cairo_format_t m_surface_format;
58
cairo_surface_t* m_cairo_surface;
59
int m_width; //!< Surface width.
60
int m_height; //!< Surface height.
65
#endif // CAIROGRAPHICS_H