IWxShape.TransparentColor

Syntax

TransparentColor: IGxColor;

Description

The TransparentColor property determines the color that will be transparent on an image and is used as a shape fill.

Example

Executing the example requires an existing ws object of the IWxWorkspace type.

Sub UserProc;

Var

ws: IWxWorkspace;

Shape: IWxShape;

Begin

ws.BeginUpdate;

Shape := ws.Shapes.Item(1);

Shape.Picture := New GxImage.CreateFromFile("C:\Image1.gif");

Shape.Style.PictureStretch := True;

Shape.TransparentColor := GxColor.FromName("Red");

ws.EndUpdate;

End Sub UserProc;

After executing the example an image, which will be stretched if the shape is resized, is used as a shape fill. Red color will be transparent in the image.

See also:

IWxShape

IWxShape.Picture