IWxStyle.PictureAutoSize

Syntax

PictureAutoSize: Boolean;

Description

The PictureAutoSize property fits size of a graphics primitive to the original image size.

Comments

If the property is set to True, size is fitted, otherwise it is not. The property is set to False by default. The example displaying objects before the property is set to True (left) and after the property is set to True (right):

Example

Executing the example requires that the repository contains workspace with the IWSTYLE identifier containing shape. It is also required to have the ConnectedCPs.gif image.

Add links to the Andy, Drawing, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    ws: IWxWorkspace;
    Shape: IWxShape;
    style: IWxStyle;
Begin
    // Get workspace for editing
    mb := MetabaseClass.Active;
    ws := mb.ItemById("IWSTYLE").Edit As IWxWorkspace;
    Shape := ws.Shapes.Item(0);
    Shape.Picture := GxImage.FromFile("C:\ConnectedCPs.gif");
    Style := Shape.Style;
    Style.PictureAutoSize := True;
    (ws As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the size is fitted.

See also:

IWxStyle