Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
Scroom::Bitmap::BitmapSurface Class Reference

#include <bitmap-helpers.hh>

Collaboration diagram for Scroom::Bitmap::BitmapSurface:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< BitmapSurface >
 

Public Member Functions

 ~BitmapSurface ()
 
 BitmapSurface (const BitmapSurface &)=delete
 
 BitmapSurface (BitmapSurface &&)=delete
 
BitmapSurfaceoperator= (const BitmapSurface &)=delete
 
BitmapSurfaceoperator= (BitmapSurface &&)=delete
 
cairo_surface_t * get ()
 

Static Public Member Functions

static Ptr create (int width, int height, cairo_format_t format)
 
static Ptr create (int width, int height, cairo_format_t format, int stride, std::shared_ptr< unsigned char > const &data)
 

Private Member Functions

 BitmapSurface (int width, int height, cairo_format_t format)
 
 BitmapSurface (int width, int height, cairo_format_t format, int stride, std::shared_ptr< unsigned char > const &data)
 

Private Attributes

cairo_surface_t *const surface
 
std::shared_ptr< unsigned char > const data
 

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ ~BitmapSurface()

Scroom::Bitmap::BitmapSurface::~BitmapSurface ( )
24{ cairo_surface_destroy(surface); }
cairo_surface_t *const surface
Definition bitmap-helpers.hh:28

◆ BitmapSurface() [1/4]

Scroom::Bitmap::BitmapSurface::BitmapSurface ( const BitmapSurface )
delete

◆ BitmapSurface() [2/4]

Scroom::Bitmap::BitmapSurface::BitmapSurface ( BitmapSurface &&  )
delete

◆ BitmapSurface() [3/4]

Scroom::Bitmap::BitmapSurface::BitmapSurface ( int  width,
int  height,
cairo_format_t  format 
)
private
29 : surface(cairo_image_surface_create(format, width, height))
30 {
31 }

◆ BitmapSurface() [4/4]

Scroom::Bitmap::BitmapSurface::BitmapSurface ( int  width,
int  height,
cairo_format_t  format,
int  stride,
std::shared_ptr< unsigned char > const &  data 
)
private
40 : surface(cairo_image_surface_create_for_data(data_.get(), format, width, height, stride))
41 , data(data_)
42 {
43 }
std::shared_ptr< unsigned char > const data
Definition bitmap-helpers.hh:29

Member Function Documentation

◆ create() [1/2]

BitmapSurface::Ptr Scroom::Bitmap::BitmapSurface::create ( int  width,
int  height,
cairo_format_t  format 
)
static

◆ create() [2/2]

BitmapSurface::Ptr Scroom::Bitmap::BitmapSurface::create ( int  width,
int  height,
cairo_format_t  format,
int  stride,
std::shared_ptr< unsigned char > const &  data 
)
static
20 {
21 return BitmapSurface::Ptr(new BitmapSurface(width, height, format, stride, data));
22 }

◆ get()

cairo_surface_t * Scroom::Bitmap::BitmapSurface::get ( )
26{ return surface; }

◆ operator=() [1/2]

BitmapSurface & Scroom::Bitmap::BitmapSurface::operator= ( BitmapSurface &&  )
delete

◆ operator=() [2/2]

BitmapSurface & Scroom::Bitmap::BitmapSurface::operator= ( const BitmapSurface )
delete

Member Data Documentation

◆ data

std::shared_ptr<unsigned char> const Scroom::Bitmap::BitmapSurface::data
private

Referenced by create().

◆ surface

cairo_surface_t* const Scroom::Bitmap::BitmapSurface::surface
private

Referenced by get(), and ~BitmapSurface().


The documentation for this class was generated from the following files: