Method WritePlot
WritePlot(string, CadDocument, CadSpace, CadPlotSettings, DisplayBox)
Writes a plot of a space to an image, as PLOT and -PLOT do with OpenCAD2D PNG or JPG: the image as large as the settings' size in pixels, on white, the plot laid on it as on a sheet whose units are pixels, colours through the plot style table (colour 7 black), each line at its lineweight as at 96 dots an inch. A PNG is lossless, a JPEG of quality 90. Model space fitted to 1920 by 1080 pixels is a PNG of exactly that size. A plot stamp the settings carry is drawn in its corner as on a PDF, 0.2 inch letters 19.2 pixels high, turned with a plot upside down, and its line added to the stamp's log file.
public static CadPlotPage WritePlot(string path, CadDocument document, CadSpace space, CadPlotSettings settings, DisplayBox display)
Parameters
pathstringThe file, replaced where there is one.
documentCadDocumentThe document.
spaceCadSpaceThe space plotted.
settingsCadPlotSettingsHow it is plotted: a raster device and a size in pixels.
displayDisplayBoxWhat the view shows, in drawing units, for a plot of the display; empty for the extents.
Returns
- CadPlotPage
The plot as it was laid on the image.
Exceptions
- ArgumentNullException
Thrown when an argument is null.
- ArgumentException
Thrown when the settings are not of a raster device in pixels.
- InvalidOperationException
Thrown when there is nothing to plot.
- IOException
Thrown when the file cannot be written.