Skip to main content

DefaultColor

Description

DefaultColor sets the color for elements which have white color in AutoCAD™ DXF/DWG - this color is default for all elements and it is white in AutoCAD™ model mode and black in AutoCAD™ layouts. It is black when printing from AutoCAD™.

Default value for DefaultColor property is clBlack but you can change it to another value - for example to clWhite and if BackgroundColor property is setted to clBlack when TsgCADImage will draw DXF/DWG as AutoCAD™ setted model mode.

Syntax

property DefaultColor: TColor

Example:

The following example demonstrates how to display a drawing with default black entities on a white background and how to display a drawing with default white entities on a black background.

vDrawing.BackgroundColor := MakeColorCAD(acIndexColor, 7); // white
vDrawing.DefaultColor := MakeColorCAD(acIndexColor, 0); // black

mb1.dxf

White background and black entities

vDrawing.BackgroundColor := MakeColorCAD(acIndexColor, 0); // black
vDrawing.DefaultColor := MakeColorCAD(acIndexColor, 7); //white

mb1.dxf

Black background and white entities