Filling solid shapes with color

You can use the Brush(Mode, Value) method exposed by the CRMGraphicBlock object to fill solid shapes, such as rectangles and ellipses, with a color or pattern. The pattern may be a predefined image loaded by using the Brush(Mode, Value) method.

Specifying a color

Use the following syntax to specify the color with which you want to fill a shape:

Copy
Brush('Color','<ColorName>');

Where <ColorName> is the name of the color you want to use.

Example

Copy
Brush('Color','Blue');

Loading an image

Use the following syntax to load an image and use it in all painting effects:

Copy
Brush('Load','<PathToImage>');

Where <PathToImage> is the full path to the image file you want to use. You can specify one of the following file types: .ico, .emf/..wmf, .bmp, .gif, or .jpg.

Example

Copy
Brush('Load','c:\\winnt\\winnt.bmp');

Specifying area to fill in

Use the following syntax to specify the area you want to fill in:

Copy
Brush('Fill','<Left>,<Top>,<Right>,<Bottom>');

Where <Left>, <Top>, <Right>, and <Bottom> define the rectangle area to be filled in.

Example

Copy
Brush('Fill','0,0,100,100');

Specifying a predefined style

Use the following syntax to choose a predefined style for filling in the specified area:

Copy
Brush('Style','<Value>');

Where <Value> can be one of the following:

  • Bdiagonal
  • Clear
  • Cross
  • DiagCross
  • Fdiagonal
  • Horizontal
  • Solid
  • Vertical

Example

Copy
Brush('Style','DiagCross');