Class CadRasterWriter
Writes the image of PNGOUT, JPGOUT and BMPOUT (CadImageJob): the view drawn by SkiaCanvasRenderer at the view's size in pixels, on the canvas's background, with no cursor, grips or highlight, then a PNG of 8-bit red, green and blue, a JPEG at a quality of 90, or a bitmap of 24 bits a pixel. The same view gives the same bytes each time. The canvas writes what it shows, its grid included; this writes a view with no canvas, as a test or a host with no window does. A view of 1 920 by 1 080 pixels of a drawing of 100 000 entities is a PNG of 1.2 MB, written in 0.25 s.
public static class CadRasterWriter
- Inheritance
-
CadRasterWriter
- Inherited Members
Methods
- Write(CadDocument, CadImageJob, CanvasOptions)
Draws the job's view of its space and writes it to its file, the objects selected alone where it has some.
- 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.