Data Fields

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

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

Number of physical pixels of the underlying image.

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

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().

The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines