Skip to main content

BackgroundColor

Description

You can use the BackgroundColor property to change a background color of your CAD image.

Syntax

property BackgroundColor: 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