Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members

# ptc::Clear Class Reference

Routines for clearing pixels. More...

List of all members.

## Public Members

- Clear ()
- ~Clear ()
- void request (const Format &format)
- void clear (void *pixels,int x,int y,int width,int height,int pitch,const Color &color)

## Detailed Description

Routines for clearing pixels.

This class is an interface to low level pixel clearing routines.

Before using the clear class take a look at the high level Surface::clear() and Console::clear() functions.

Typically the only time the clear class is required is when you are managing your own pixel buffers.

## Member Function Documentation

### ptc::Clear::Clear ()

Default constructor.

### ptc::Clear::~Clear ()

Destructor.

### void ptc::Clear::request (const Format & format)

Request a clear routine for the specified pixel format format.

Parameters:
  format - the pixel format.

Exceptions:
  Error - An Error exception is thrown on failure.

### void ptc::Clear::clear (void * pixels, int x, int y, int width, int height, int pitch, const Color & color)

Clear an area of the pixel array pixels to the specified color color.

Warning:
  You must first call Clear::request() to initialize the pixel format.

Parameters:
  pixels - the pixel array.
  x - the x coordinate of the top-left corner of the clear area.
  y - the y coordinate of the top-left corner of the clear area.
  width - the width of the clear area in pixels.
  height - the height of the clear area in pixels.
  pitch - the pitch of the pixel array in bytes.
  color - the clear color.

Exceptions:
  Error - An Error exception is thrown on failure.

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

- ptc.h