Picture: IGxImage;
The Picture property determines the image to be used as a shape fill.
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: