QCAD
Open Source 2D CAD
BitmapExportWorker.js File Reference

Functions

void exportBitmap (void doc, void scene, void fileName, void properties, void view)
 Exports the given RDocument (doc) to a bitmap (BMP, PNG, JPEG, TIFF, ...). More...
 

Function Documentation

void exportBitmap ( void  doc,
void  scene,
void  fileName,
void  properties,
void  view 
)

Exports the given RDocument (doc) to a bitmap (BMP, PNG, JPEG, TIFF, ...).

Parameters
docRDocument document
sceneGraphics scene to export (e.g. RGraphicsSceneQt)
fileNameFile name for exported bitmap. Extension determines format.
propertiesVarious properties: properties["width"]: width of bitmap in pixels (ignored if resolution is present) properties["height"]: height of bitmap in pixels (ignored if resolution is present) properties["resolution"]: resolution in pixels / drawing unit properties["margin"]: margin at borders in pixels properties["backgroundColor"]: background color (RColor) properties["origin"]: true: export origin point as red cross properties["antialiasing"]: true: use antialiasing properties["quality"]: Export quality (0..100), JPEG only properties["monochrome"]: true: Export as black / white properties["grayscale"]: true: Export as grayscale properties["window"]: RBox: window to export in drawing coordinates properties["initView"]: Callback to initialize view
viewOptional graphics view to use.