HPGS - HPGl Script
Data Fields
hpgs_paint_clipper_st Struct Reference

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

#include <hpgspaint.h>

Data Fields

hpgs_paint_scanlinescanlines
 
int n_scanlines
 
hpgs_bbox bb
 
double yfac
 
double y0
 
hpgs_bool overscan
 
int height
 
int iscan0
 
int iscan1
 

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

◆ height

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

◆ iscan0

int hpgs_paint_clipper_st::iscan0

◆ iscan1

int hpgs_paint_clipper_st::iscan1

◆ overscan

hpgs_bool hpgs_paint_clipper_st::overscan

◆ scanlines

hpgs_paint_scanline* hpgs_paint_clipper_st::scanlines

◆ yfac

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


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