# hpgs_paint_device_st Struct Reference
[Paint device.]

The pixel rendering vector graphics device. More...

`#include <hpgspaint.h>`

## Data Fields
hpgs_device | inherited
hpgs_image * | image
char * | filename
hpgs_bbox | page_bb
double | xres
double | yres
hpgs_bool | overscan
double | thin_alpha
hpgs_paint_path * | path
hpgs_paint_clipper * | path_clipper
hpgs_paint_clipper * | clippers [HPGS_PAINT_MAX_CLIP_DEPTH]
int | current_clipper
int | clip_depth
hpgs_gstate * | gstate
hpgs_paint_color | color
hpgs_palette_color | patcol
int | image_interpolation

## Detailed Description

The pixel rendering vector graphics device.

This structure has a public alias `hpgs_paint_device` and represents a `hpgs_device` which draws to a given `hpgs_image`. It is capable of drawing polgonal data with optional antialiasing. Image may be drawn using a linear interpolation of the pixel values or uninterpolated.

The following figure outlines the coordinate setup of a paint device.

Further details on antialiasing and scanline setup are described in the documentation of `hpgs_paint_clipper_st`.

## Field Documentation

hpgs_device hpgs_paint_device_st::inherited

The base device structure.

Referenced by hpgs_new_paint_device().

hpgs_image* hpgs_paint_device_st::image

The image to which we draw.

Referenced by hpgs_new_paint_device(), hpgs_paint_device_drawimage(), and hpgs_paint_device_fill().

char* hpgs_paint_device_st::filename

The image filename without an eventual extension.

Referenced by hpgs_new_paint_device().

double hpgs_paint_device_st::xres

The bounding box in world coordinates, which is mapped onto the image. The resolution of the image in x direction.

Referenced by hpgs_new_paint_device().

double hpgs_paint_device_st::yres

The resolution of the image in y direction.

Referenced by hpgs_new_paint_device().

hpgs_bool hpgs_paint_device_st::overscan

Specifies, whether we use antialiasing for rendering the image.

Referenced by hpgs_new_paint_device(), and hpgs_paint_device_drawimage().

double hpgs_paint_device_st::thin_alpha

The minimal alpha value for antialiased thin lines.

Referenced by hpgs_new_paint_device(), and hpgs_paint_device_set_thin_alpha().

hpgs_paint_path* hpgs_paint_device_st::path

The current path, which is under contruction.

Referenced by hpgs_new_paint_device().

hpgs_paint_clipper* hpgs_paint_device_st::path_clipper

The mapping of the current path onto the defined scanlines.

Referenced by hpgs_new_paint_device(), hpgs_paint_device_clip(), and hpgs_paint_device_fill().

hpgs_paint_clipper* hpgs_paint_device_st::clippers[HPGS_PAINT_MAX_CLIP_DEPTH]

A stack of mappings of the clip path' of onto the defined scanlines.

Referenced by hpgs_new_paint_device(), hpgs_paint_device_clip(), hpgs_paint_device_drawimage(), and hpgs_paint_device_fill().

int hpgs_paint_device_st::current_clipper

The position of the current clip path in `clippers`.

Referenced by hpgs_new_paint_device(), hpgs_paint_device_clip(), hpgs_paint_device_drawimage(), and hpgs_paint_device_fill().

int hpgs_paint_device_st::clip_depth

The current depth of the clip stack, i.e. the number of time `hpgs_clip` or `hpgs_eoclip` has been called.

Referenced by hpgs_new_paint_device(), and hpgs_paint_device_clip().

hpgs_gstate* hpgs_paint_device_st::gstate

The graphics state.

Referenced by hpgs_new_paint_device().

hpgs_paint_color hpgs_paint_device_st::color

The current color transformed to a device color.

Referenced by hpgs_new_paint_device(), and hpgs_paint_device_fill().

hpgs_palette_color hpgs_paint_device_st::patcol

The current pattern color transformed to a device color.

Referenced by hpgs_new_paint_device().

int hpgs_paint_device_st::image_interpolation

A flag holding whether we do image interpolation.

Referenced by hpgs_new_paint_device(), hpgs_paint_device_drawimage(), and hpgs_paint_device_set_image_interpolation().

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

- hpgspaint.h