Public Member Functions

gfxImageSurface Class Reference

A raw image buffer. More...

#include <gfxImageSurface.h>

Inheritance diagram for gfxImageSurface:
Collaboration diagram for gfxImageSurface:

List of all members.

Public Member Functions

 gfxImageSurface (unsigned char *aData, const gfxIntSize &aSize, long aStride, gfxImageFormat aFormat)
 Construct an image surface around an existing buffer of image data.
 gfxImageSurface (const gfxIntSize &size, gfxImageFormat format)
 Construct an image surface.
 gfxImageSurface (cairo_surface_t *csurf)
virtual ~gfxImageSurface ()
gfxImageFormat Format () const
const gfxIntSizeGetSize () const
PRInt32 Width () const
PRInt32 Height () const
PRInt32 Stride () const
 Distance in bytes between the start of a line and the start of the next line.
unsigned char * Data () const
 Returns a pointer for the image data.
PRInt32 GetDataSize () const
 Returns the total size of the image data.
PRBool CopyFrom (gfxImageSurface *other)

Detailed Description

A raw image buffer.

The format can be set in the constructor. Its main purpose is for storing read-only images and using it as a source surface, but it can also be drawn to.


Constructor & Destructor Documentation

gfxImageSurface::gfxImageSurface ( unsigned char *  aData,
const gfxIntSize aSize,
long  aStride,
gfxImageFormat  aFormat 
)

Construct an image surface around an existing buffer of image data.

Parameters:
aData A buffer containing the image data
aSize The size of the buffer
aStride The stride of the buffer
format Format of the data
See also:
gfxImageFormat
gfxImageSurface::gfxImageSurface ( const gfxIntSize size,
gfxImageFormat  format 
)

Construct an image surface.

Parameters:
aSize The size of the buffer
format Format of the data
See also:
gfxImageFormat
gfxImageSurface::gfxImageSurface ( cairo_surface_t csurf  ) 
virtual gfxImageSurface::~gfxImageSurface (  )  [virtual]

Member Function Documentation

PRBool gfxImageSurface::CopyFrom ( gfxImageSurface other  ) 
unsigned char* gfxImageSurface::Data (  )  const [inline]

Returns a pointer for the image data.

Users of this function can write to it, but must not attempt to free the buffer.

gfxImageFormat gfxImageSurface::Format (  )  const [inline]
PRInt32 gfxImageSurface::GetDataSize (  )  const [inline]

Returns the total size of the image data.

const gfxIntSize& gfxImageSurface::GetSize (  )  const [inline]
PRInt32 gfxImageSurface::Height (  )  const [inline]
PRInt32 gfxImageSurface::Stride (  )  const [inline]

Distance in bytes between the start of a line and the start of the next line.

PRInt32 gfxImageSurface::Width (  )  const [inline]

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