ImageDevice

ImageDevice class

Represents rendering to raster formats: jpeg, png, bmp, gif, tiff.

public class ImageDevice : Device<ImageGraphicContext, ImageRenderingOptions>

Constructors

Name Description
ImageDevice(ICreateStreamProvider) Initializes a new instance of the ImageDevice class.
ImageDevice(Stream) Initializes a new instance of the ImageDevice class.
ImageDevice(string) Initializes a new instance of the ImageDevice class.
ImageDevice(ImageRenderingOptions, ICreateStreamProvider) Initializes a new instance of the ImageDevice class by rendering options and stream provider.
ImageDevice(ImageRenderingOptions, Stream) Initializes a new instance of the ImageDevice class by rendering options and output stream.
ImageDevice(ImageRenderingOptions, string) Initializes a new instance of the ImageDevice class by rendering options and output file name.

Properties

Name Description
GraphicContext { get; }
virtual Graphics { get; } Gets the instance of Graphics.
Options { get; }

Methods

Name Description
override AddRect(RectangleF) Appends a rectangle to the current path as a complete subpath.
override BeginDocument(Document) Begins rendering of the document.
override BeginElement(Element, RectangleF) Begins rendering of the element.
override BeginPage(SizeF) Begins rendering of the new page.
override Clip(FillMode) Modifies the current clipping path by intersecting it with the current path, using the FillMode rule to determine the region to fill. This method terminates current path.
override ClosePath() Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath. If the current subpath is already closed, “ClosePath” does nothing. This operator terminates the current subpath. Appending another segment to the current path begins a new subpath, even if the new segment begins at the endpoint reached by the “ClosePath” method.
override CubicBezierTo(PointF, PointF, PointF) Appends a cubic Bézier curve to the current path. The curve extends from the current point to the point pt2, using pt1 and pt2 as the Bézier control points. The new current point is pt3.
Dispose()
override DrawImage(byte[], ImageType, RectangleF) Draws the specified image.
override EndDocument() Ends rendering of the document.
override EndElement(Element) Ends rendering of the element.
override EndPage() Ends rendering of the current page.
override Fill(FillMode) Fills the entire region enclosed by the current path. If the path consists of several disconnected subpaths, it fills the insides of all subpaths, considered together. This method terminates current path.
override FillText(string, PointF) Fills the specified text string at the specified location.
override Flush() Flushes all data to output stream.
override LineTo(PointF) Appends a straight line segment from the current point to the point (pt). The new current point is pt.
override MoveTo(PointF) Begins a new subpath by moving the current point to coordinates of the parameter pt, omitting any connecting line segment. If the previous path construction method in the current path was also “MoveTo”, the new “MoveTo” overrides it; no vestige of the previous “MoveTo” operation remains in the path.
override RestoreGraphicContext() Restores the entire graphics context to its former value by popping it from the stack.
override SaveGraphicContext() Pushes a copy of the entire graphics context onto the stack.
override Stroke() Strokes a line along the current path. The stroked line follows each straight or curved segment in the path, centered on the segment with sides parallel to it. Each of the path’s subpaths is treated separately. This method terminates current path.
override StrokeAndFill(FillMode) Strokes and fill current path. This method terminates current path.
override StrokeText(string, PointF) Strokes the specified text string at the specified location.

Other Members

Name Description
class ImageGraphicContext Holds current graphics control parameters for the ImageDevice. These parameters define the global framework within which the graphics operators execute.

See Also