Flipper CAD Control Overview Font Overview            Table of Contents

Colors Overview


 

Color States

A color state is comprised of pen and brush settings. The brush is used for painting the enclosed areas of shapes, while the pen is used for drawing the border of shapes. In the case of the line, polyline, freehand, and spline shapes the brush is not used.

Brush settings include:

 

Pen settings include:

 

Colors With Layers, Shapes, and Groups

When shapes are added to the Cad control, by default they use the color state of the Cad. Layers, groups and shapes may have their own unique color state, however. This happens whenever any of the layer or shape color properties is set (LayerPenFg, LayerBrushFg, LayerBrushBg, ShapePenFg, ShapeBrushFg, ShapeBrushBg).
 

Color Property Hierarchy

The precedence for which color state a shape uses is:

1. Shape color state (if shape has its own color state)
2. Group color state (if shape belongs in a group, and that group has its own color state)
3. Layer color state
4. Cad color state


As long as a shape has its own color state, it will ignore the group, layer and cad color properties. Group color states will ignore layer and cad color proprties and so forth. To determine if a shape or a group has its own color state, use ShapeIsColorSet. To determine if a layer has its own color state, use LayerIsColorSet.

To reset the color state of the shape, group or layer (causing it to use the color state of next highest level in the color hierarchy), use ShapeColorReset or LayerColorReset.
 

Setting Colors

The value that each of the color properties takes is an OLE color value. How to set a color property, and the value it returns, depends on the programming language used.

FoxPro uses RGB().
Visual Basic uses QBColor() or RGB().
MSVC uses RGB().

Delphi uses RGB().

For other programming languages, check your documentation.
 

See Also

Cad Color Properties: CadBrushFG, CadBrushBg, CadBrushMode, CadBrushStyle, CadBrushFg, CadPenStyle, CadPenWidth

Layer Color Properties: LayerBrushFg, LayerBrushBg, LayerBrushMode, LayerBrushStyle, LayerPenFg, LayerPenStyle, LayerPenWidth

Shape Color Properties: ShapeBrushFg, ShapeBrushBg, ShapeBrushMode, ShapeBrushStyle, ShapePenFg, ShapePenStyle, ShapePenWidth

Sticky Point Marker Color Properties: FlowFemaleStickyBrushBg, FlowFemaleStickyBrushFg, FlowFemaleStickyBrushStyle, FlowFemaleStickyBrushMode, FlowFemaleStickyPenFg, FlowFemaleStickyPenStyle, FlowFemaleStickyMarkerSize, FlowMaleStickyBrushBg, FlowMaleStickyBrushFg, FlowMaleStickyBrushStyle, FlowMaleStickyBrushMode, FlowMaleStickyPenFg, FlowMaleStickyPenStyle, FlowMaleStickyMarkerSize

Other: ShapeIsColorSet, ShapeColorReset, GridColor, BackColor



Flipper CAD Control Overview Font Overview

 

Last modified on: Tuesday, February 04, 2003