Scroom  0.14
Scroom::Bitmap::BitmapSurface Class Reference

#include <bitmap-helpers.hh>

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

Public Types

using Ptr = boost::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, boost::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, boost::shared_ptr< unsigned char > const &data)
 

Private Attributes

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

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ ~BitmapSurface()

Scroom::Bitmap::BitmapSurface::~BitmapSurface ( )
24 { cairo_surface_destroy(surface); }

◆ BitmapSurface() [1/4]

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

Referenced by create().

Here is the caller graph for this function:

◆ 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,
boost::shared_ptr< unsigned char > const &  data 
)
private
38  : surface(cairo_image_surface_create_for_data(data_.get(), format, width, height, stride))
39  , data(data_)
40  {
41  }

Member Function Documentation

◆ create() [1/2]

BitmapSurface::Ptr Scroom::Bitmap::BitmapSurface::create ( int  width,
int  height,
cairo_format_t  format 
)
static
14  {
15  return BitmapSurface::Ptr(new BitmapSurface(width, height, format));
16  }

Referenced by OperationsCMYK32::cache(), OperationsCMYK16::cache(), OperationsCMYK8::cache(), OperationsCMYK4::cache(), CommonOperations::cacheZoom(), and TransformPresentation::redraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create() [2/2]

BitmapSurface::Ptr Scroom::Bitmap::BitmapSurface::create ( int  width,
int  height,
cairo_format_t  format,
int  stride,
boost::shared_ptr< unsigned char > const &  data 
)
static
20  {
21  return BitmapSurface::Ptr(new BitmapSurface(width, height, format, stride, data));
22  }
Here is the call graph for this function:

◆ 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

const boost::shared_ptr<unsigned char> 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:
Scroom::Bitmap::BitmapSurface::data
const boost::shared_ptr< unsigned char > data
Definition: bitmap-helpers.hh:29
Scroom::Bitmap::BitmapSurface::Ptr
boost::shared_ptr< BitmapSurface > Ptr
Definition: bitmap-helpers.hh:25
Scroom::Bitmap::BitmapSurface::surface
cairo_surface_t *const surface
Definition: bitmap-helpers.hh:28
Scroom::Bitmap::BitmapSurface::BitmapSurface
BitmapSurface(const BitmapSurface &)=delete