BrushColors

Visual LANSA Feature

BrushColors

BrushColors is a collector of BrushColor (Prim_Vs.BrushColor) instances.  This abstraction allows same set of colors to be used on multiple brushes.

BrushColors uses BrushColor instances to describe the transition from one color to another.  Typically, this might be a simple gradient transition from silver at the top to white at the bottom, but the number of colors and the nature of the transition are dependent on the configuration of the specific class of brush being used and the definition of the color instances.

The sample below changes from blue at the start to red at the end.  This is denoted by the use of "At(100)" on the second color (#Color2)

Define_Com Class(#Prim_Vs.BrushColors) Name(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color1) Color(0:0:255) Parent(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color2) At(100) Color(255:0:0) Parent(#Colors)

As the transition is uniform the blue channel is decremented from 255 to 0 while the red channel increases from 0 to 255.  The result is that at the mid-point the color will be 128:0:128, which is purple.