Public Types |
| enum | gfxImageFormat {
ImageFormatARGB32,
ImageFormatRGB24,
ImageFormatA8,
ImageFormatA1,
ImageFormatRGB16_565,
ImageFormatUnknown
} |
| | The format for an image surface.
More...
|
| enum | gfxSurfaceType {
SurfaceTypeImage,
SurfaceTypePDF,
SurfaceTypePS,
SurfaceTypeXlib,
SurfaceTypeXcb,
SurfaceTypeGlitz,
SurfaceTypeQuartz,
SurfaceTypeWin32,
SurfaceTypeBeOS,
SurfaceTypeDirectFB,
SurfaceTypeSVG,
SurfaceTypeOS2,
SurfaceTypeWin32Printing,
SurfaceTypeQuartzImage,
SurfaceTypeScript,
SurfaceTypeQPainter,
SurfaceTypeRecording,
SurfaceTypeVG,
SurfaceTypeGL,
SurfaceTypeDRM,
SurfaceTypeTee,
SurfaceTypeXML,
SurfaceTypeSkia,
SurfaceTypeD2D,
SurfaceTypeMax
} |
| enum | gfxContentType { CONTENT_COLOR = 0x1000,
CONTENT_ALPHA = 0x2000,
CONTENT_COLOR_ALPHA = 0x3000
} |
Public Member Functions |
| nsrefcnt | AddRef (void) |
| nsrefcnt | Release (void) |
| cairo_surface_t * | CairoSurface () |
| gfxSurfaceType | GetType () const |
| gfxContentType | GetContentType () const |
| void | SetDeviceOffset (const gfxPoint &offset) |
| gfxPoint | GetDeviceOffset () const |
| void | Flush () const |
| void | MarkDirty () |
| void | MarkDirty (const gfxRect &r) |
| virtual nsresult | BeginPrinting (const nsAString &aTitle, const nsAString &aPrintToFileName) |
| virtual nsresult | EndPrinting () |
| virtual nsresult | AbortPrinting () |
| virtual nsresult | BeginPage () |
| virtual nsresult | EndPage () |
| void | SetData (const cairo_user_data_key_t *key, void *user_data, thebes_destroy_func_t destroy) |
| void * | GetData (const cairo_user_data_key_t *key) |
| virtual void | Finish () |
virtual already_AddRefed
< gfxASurface > | CreateSimilarSurface (gfxContentType aType, const gfxIntSize &aSize) |
| | Create an offscreen surface that can be efficiently copied into this surface (at least if tiling is not involved).
|
virtual already_AddRefed
< gfxImageSurface > | GetAsImageSurface () |
| | Returns an image surface for this surface, or nsnull if not supported.
|
| int | CairoStatus () |
| virtual PRInt32 | GetDefaultContextFlags () const |
| void | SetSubpixelAntialiasingEnabled (PRBool aEnabled) |
| PRBool | GetSubpixelAntialiasingEnabled () |
| void | RecordMemoryUsed (PRInt32 aBytes) |
| | Same as above, but use current surface type as returned by GetType().
|
| void | RecordMemoryFreed () |
| PRInt32 | KnownMemoryUsed () |
| virtual const gfxIntSize | GetSize () const |
| void | SetOpaqueRect (const gfxRect &aRect) |
| const gfxRect & | GetOpaqueRect () |
| virtual PRBool | SupportsSelfCopy () |
| void | SetAllowUseAsSource (PRBool aAllow) |
| | Mark the surface as being allowed/not allowed to be used as a source.
|
| PRBool | GetAllowUseAsSource () |
Static Public Member Functions |
static already_AddRefed
< gfxASurface > | Wrap (cairo_surface_t *csurf) |
| | Wrap the given cairo surface and return a gfxASurface for it.
|
| static PRBool | CheckSurfaceSize (const gfxIntSize &sz, PRInt32 limit=0) |
| static gfxContentType | ContentFromFormat (gfxImageFormat format) |
| static gfxImageFormat | FormatFromContent (gfxContentType format) |
| static void | RecordMemoryUsedForSurfaceType (gfxASurface::gfxSurfaceType aType, PRInt32 aBytes) |
| | Record number of bytes for given surface type.
|
| static PRInt32 | BytePerPixelFromFormat (gfxImageFormat format) |
Protected Member Functions |
| | gfxASurface () |
| void | Init (cairo_surface_t *surface, PRBool existingSurface=0) |
| virtual | ~gfxASurface () |
Static Protected Member Functions |
| static gfxASurface * | GetSurfaceWrapper (cairo_surface_t *csurf) |
| static void | SetSurfaceWrapper (cairo_surface_t *csurf, gfxASurface *asurf) |
Protected Attributes |
| cairo_surface_t * | mSurface |
| nsAutoPtr< gfxRect > | mOpaqueRect |
| PRPackedBool | mSurfaceValid |
| PRPackedBool | mAllowUseAsSource |
A surface is something you can draw on.