IWxViewExporter.PixelHeight

Fore Syntax

PixelHeight: Integer;

Fore.NET Syntax

PixelHeight: Integer;

Description

The PixelHeight property determines the height of the image after export.

Comments

The size of image on export is set using the following algorithm:

  1. Actual width and height of the image are calculated in accordance with the distance from uppermost left top to the lowermost right top of the shape.

  2. The following correlations are calculated:

  3. In case of maximum correlation the size value is scaled to keep the image proportions.

By default, the PixelHeight property is set to 0, the exported image has the calculated height.

Fore Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for it.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Exp: IWxViewExporter;
Begin
    Exp := New WxViewExporter.Create;
    Exp.WxView := WorkspaceBox1.View;
    Exp.PixelHeight := 500;
    Exp.PixelHeight := 300;
    Exp.ExportToFile("C:\WS.jpg""JPG");
End Sub Button1OnClick;

On clicking the button the workspace displayed in the WorkspaceBox1 is exported. On export the size of the final image is set. One of the sizes is scaled to keep the image proportions if required.

Fore.NET Example

Executing the example requires a .NET form with the Button1 button, the WorkspaceBoxNet component named WorkspaceBoxNet1 and a data source for it.

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Exp: WxViewExporter = New WxViewExporter();
Begin
    Exp.WxView := WorkspaceBoxNet1.View;
    Exp.PixelHeight := 500;
    Exp.PixelHeight := 300;
    Exp.ExportToFile("C:\WS.jpg""JPG");
End Sub;

On clicking the button the workspace displayed in the WorkspaceBoxNet1 is exported. On export the size of the final image is set. One of the sizes is scaled to keep the image proportions if required.

See also:

IWxViewExporter