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

# ptc::Clipper Class Reference

Routines for clipping areas. More...

List of all members.

## Static Public Members

- Area clip (const Area &clip,const Area &area)
- void clip (const Area &clip_source,const Area &source,Area &clipped_source, const Area &clip_destination,const Area &destination,Area &clipped_destination)

## Detailed Description

Routines for clipping areas.

This class provides low level area clipping routines.

Before using the clipper class take a look at the high level Surface::clip(const Area &clip) function.

Typically the only time the clipper class is required is when you are managing your own pixel buffers and performing clipping manually.

## Member Function Documentation

### Area ptc::Clipper::clip (const Area & clip, const Area & area)`[static]`

Clip the area area to the clipping area clip and returns the result.

Parameters:
  clip - the clip area.
  area - the area to clip.

Returns:
  The clipped area.

### void ptc::Clipper::clip (const Area & clip_source, const Area & source, Area & clipped_source, const Area & clip_destination, const Area & destination, Area & clipped_destination)`[static]`

Clip the source area source to the source clip area clip_source, then clips the destination area destination to the destination clip area clip_destination.

This clip assumes that the source and destination areas are dependent, so when the source area is clipped, the destination area is adjusted to compensate and vice versa.

This clipping routine also correctly handles cases where the source and destination areas involve stretching.

The resulting clipped areas are assigned to the clipped_source and clipped_destination parameters.

TODO: add source_reference and destination_reference areas for proper stretch clip support!

Parameters:
  clip_source - the source clip area.
  source - the source area to clip.
  clipped_source - the output clipped source area.
  clip_destination - the destination clip area.
  destination - the destination area to clip.
  clipped_destination - the output clipped destination area.

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

- ptc.h