Device class

Device class

This class encapsulates rendering of document to abstract device. Rendering of the document is performed page by page.

The Device type exposes the following members:

Properties

PropertyDescription
creatorReturns or specifies creator of resulting device output.
sizeReturns or specifies a size of the page.
is_direct_rgbIndicates whether device uses direct RGB mode, that is RGB.
backgroundReturns or specifies current background of the page.
opacityReturns or specifies current opacity.
strokeReturns or specifies current stroke.
paintReturns or specifies current paint.
opacity_maskReturns or specifies current opacity mask.
char_tmReturns or specifies current characters transform.
text_rendering_modeReturns or specifies current text rendering mode.
text_stroke_widthReturns or specifies current text stroke width.
versionCurrent device version.

Methods

MethodDescription
rotateRotate the current transformation matrix. Calls writeTransform(Transform).
Rotating with a positive angle theta rotates points on the positive x axis
toward the positive y axis.
rotateRotate the current transformation matrix around a point.
draw_polylineDraws a polyline.
draw_polylineDraws a polyline.
draw_polygonDraws a polygon.
draw_polygonDraws a poligone.
fill_polygonFills a poligone.
fill_polygonFills a poligone.
re_newReset device to initial state for whole document. Used for reseting output stream.
get_propertyGets a value of string property.
get_property_colorGets a value of color property.
get_property_rectangleGets a value of rectangle property.
get_property_marginsGets a value of margin property.
get_property_sizeGets a value of size property.
get_property_intGets a value of integer property.
get_property_doubleGets a value of double property.
is_propertyGets a value of boolean property.
createCreates a copy of this device.
set_transformSpecifies current transform.
get_transformGets current transform.
transformTransforms the current transformation matrix. Calls writeTransform(Transform)
translateTranslates the current transformation matrix. Calls writeTransform(Transform).
scaleScales the current transformation matrix. Calls writeTransform(Transform).
shearShears the current transformation matrix. Calls writeTransform(Transform).
init_clipInitializes clip of the device.
set_clipSpecifies the clip of the device.
drawDraws a path.
fillFills a path.
draw_stringDraws a string at given point.
draw_imageDraws an image with assigned transform and background.
start_documentMakes necessary preparation of device before start rendering of document.
end_documentMakes necessary preparation of device after the document has been rendered.
disposeDisposes the device.
resetReset the device to initial state for a page.
write_commentWrites a comment.
draw_arcDraws an arc.
draw_lineDraws a line segment.
draw_ovalDraws an oval.
draw_rectDraws a rectangle.
draw_round_rectDraws a round rectangle.
fill_arcFills an arc.
fill_ovalFills an oval.
fill_rectFills a rectangle.
fill_round_rectFills a round rectangle.

See Also