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:
Brush('Color','<ColorName>');
Where <ColorName> is the name of the color you want to use.
Example
Brush('Color','Blue');
Loading an image
Use the following syntax to load an image and use it in all painting effects:
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
Brush('Load','c:\\winnt\\winnt.bmp');
Specifying area to fill in
Use the following syntax to specify the area you want to fill in:
Brush('Fill','<Left>,<Top>,<Right>,<Bottom>');
Where <Left>, <Top>, <Right>, and <Bottom> define the rectangle area to be filled in.
Example
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:
Brush('Style','<Value>');
Where <Value> can be one of the following:
- Bdiagonal
- Clear
- Cross
- DiagCross
- Fdiagonal
- Horizontal
- Solid
- Vertical
Example
Brush('Style','DiagCross');