Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
StColorSpaceReleaser Class Reference

Stack based utility class for releasing a Quartz color space. More...

#include <nsGfxUtils.h>

List of all members.

Public Member Functions

 StColorSpaceReleaser (CGColorSpaceRef inColorSpace)
 ~StColorSpaceReleaser ()

Private Attributes

CGColorSpaceRef mColorSpace

Detailed Description

Stack based utility class for releasing a Quartz color space.

Use as follows: CGColorSpaceRef rgbSpace = ::CGColorSpaceCreateDeviceRGB(); StColorSpaceReleaser csReleaser(rgbSpace);

Definition at line 417 of file nsGfxUtils.h.


Constructor & Destructor Documentation

StColorSpaceReleaser::StColorSpaceReleaser ( CGColorSpaceRef  inColorSpace) [inline]

Definition at line 420 of file nsGfxUtils.h.

  : mColorSpace(inColorSpace)
  {
  }

Definition at line 425 of file nsGfxUtils.h.

  {
    // No need to check for NULL, since CGColorSpaceCreateDeviceRGB(NULL)
    // is a noop.
    ::CGColorSpaceRelease(mColorSpace);
  }

Member Data Documentation

CGColorSpaceRef StColorSpaceReleaser::mColorSpace [private]

Definition at line 433 of file nsGfxUtils.h.


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