QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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, ...).
 

Function Documentation

◆ exportBitmap()

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["noWeightMargin"]: true to disable margin for lineweight, defaults to false
  • 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["entityIds"]: Array: zoom to bounding box of given entities
  • properties["initView"]: Callback to initialize view
  • properties["zoomAll"]: Auto zoom to all entities, including those on invisible layers
  • properties["metaData"]: Key / value pairs of meta data to write to image header
Parameters
viewOptional graphics view to use.