A color is used for specifying the additional visual distinction between geometrical objects on the same layer or different layers, in the same block or different blocks, or between objects independent of a layer or block. A color is also used as a way to indicate lineweights for color-dependent plotting or to display a visual property when it cannot be displayed another way. The C++ platform supports various ways for working with a color and transparency.
A color consists of using a 32-bit integer value in which the various color components are packed. A color can be defined as a three-element value that stores the red, green, and blue components; as an index of a palette that stores the actual color value; as a reference to another object whose color must be used, or as a foreground. Each definition way, named as a color method, has its own features. The 32-bit packed integer value stores the color method and color components that correspond together to the method.
A transparency consists of using a 32-bit integer value in which the various transparency components are packed. A transparency can be defined as an alpha value that is the degree of clarity or as a reference to another object whose transparency must be used. The 32-bit packed integer value stores the transparency method and transparency components that correspond together to the method.
An alternative color definition is the naming of colors. The named color is defined by a string that is the color name and a string that is stored in a color book. The color book stores the set of records that define how colors must be displayed. Color books can be saved as individual files from which they can be loaded in an application. Color books provide individual settings of colors for specific devices or goals.
A color can also be defined as a database object that provides additional functionality, such as the converting of color information in or from a .dwg or .dxf file, using named colors, and auditing color values.
Working with Colors and Transparencies
Overview of Classes that Implement Color and Transparency
Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.
|