# hpgs_paint_clipper_st Struct Reference
[scanline handling.]

A collection of scanlines for mapping paths onto images. More...

`#include <hpgspaint.h>`

## Data Fields
hpgs_bbox | bb
hpgs_bool | overscan
int | height
int | iscan0
int | iscan1
hpgs_paint_scanline * | scanlines
int | n_scanlines
double | yfac
double | y0

## Detailed Description

A collection of scanlines for mapping paths onto images.

This structure has a public alias `hpgs_paint_clipper` and holds intersection points of a path with a rectangular region represented by a series of equidistantly distributed scanlines.

The `overscan` member determines, whether we use antialiasing for mappinng the path. The name of this structure member is historical, because up to `hpgs-0.8.x` the antialiasing renderer effectively used more than one scanline per physical image row in order to caclulate alpha values.

Nowadays a scanline always represents the middle of the corresponding physical row of the image as sketch in the folowing figure, which show the generated segment for non-antialiased rendering.

If `overscan` is non-zero, the segment generator caclulates slopes of the trapezoids, which are generated by the path segments cutting the boundaries between two physical grid lines as sketched in the following figure.

## Field Documentation

hpgs_paint_scanline* hpgs_paint_clipper_st::scanlines

The vector of scanlines in this clipper.

Referenced by hpgs_new_paint_clipper(), hpgs_paint_clipper_clear(), hpgs_paint_clipper_clip(), hpgs_paint_clipper_destroy(), hpgs_paint_clipper_emit(), hpgs_paint_clipper_reset(), hpgs_paint_clipper_thin_cut(), and hpgs_paint_device_drawimage().

double hpgs_paint_clipper_st::yfac

The bounding box of this clipper in world coordinates.

The mapping of scanline numbers to world coordinates. `iscan=`(y0-y)/yfac and `y=y0-iscan*yfac`.

Referenced by hpgs_new_paint_clipper(), and hpgs_paint_device_drawimage().

hpgs_bool hpgs_paint_clipper_st::overscan

Do we use antialiasing ?.

Referenced by hpgs_new_paint_clipper(), hpgs_paint_clipper_clip(), hpgs_paint_clipper_cut(), hpgs_paint_clipper_emit(), and hpgs_paint_clipper_reset().

int hpgs_paint_clipper_st::height

Number of physical pixels of the underlying image.

Referenced by hpgs_new_paint_clipper(), hpgs_paint_clipper_clip(), and hpgs_paint_clipper_emit().

int hpgs_paint_clipper_st::iscan0

The first scanline with non-zero intersections.

Referenced by hpgs_new_paint_clipper(), hpgs_paint_clipper_clear(), hpgs_paint_clipper_clip(), hpgs_paint_clipper_emit(), hpgs_paint_clipper_reset(), hpgs_paint_clipper_thin_cut(), and hpgs_paint_device_drawimage().

int hpgs_paint_clipper_st::iscan1

The last scanline with non-zero intersections.

Referenced by hpgs_new_paint_clipper(), hpgs_paint_clipper_clear(), hpgs_paint_clipper_clip(), hpgs_paint_clipper_emit(), hpgs_paint_clipper_reset(), and hpgs_paint_device_drawimage().

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

- hpgspaint.h