IScene3DExporter.PixelHeight

Fore Syntax

PixelHeight: Integer;

Fore.NET Syntax

PixelHeight: System.Int32;

Description

The PixelHeight property determines the height of the 3D scene in pixels.

Fore Example

Executing the example requires a form with a button named Button1 and a regular report with the Rep_1 identifier that contains a 3D scene object. Add links to the Chart, ExtCtrls, Drawing, Export, Forms, Metabase, Report, Tab system assemblies.

The example is a handler of the OnClick event for the button.

Sub Button1OnClick(Sender: Object; Args: IEventArgs);
Var
    exp : IScene3DExporter;
    tab : ITabObject;
    mb : IMEtabase;
Begin
    mb := MetabaseClass.Active;
    exp := 
New Scene3DExporter.Create;
    exp.Scene3D := ((mb.ItemById(
"Rep_1").Bind As IPrxReport).sheets.item(0As IPrxTable).TabSheet.Objects.Item(0).Extension As IScene3D;
    exp.PixelHeight := 
500;
    exp.PixelWidth := 
500;
    exp.ExportToFile(
"C:\temp\1.jpg","jpg");
    exp.GetBitmap.SaveToFile(
"C:\2.jpg");

    exp.Scale := 0.5;
End Sub Button1OnClick;

Clicking the button loads the graphic image of the 3D scene the file to be used in the regular report with the specified height and width in pixels and the specified scale.

Fore.NET Example

Executing the example requires a .NET form with a button named button1 and a regular report with the Rep_1 identifier that contains a 3D scene object. Add links to the Chart, ExtCtrls, Drawing, Export, Forms, Report and Tab system assemblies.

The example is a handler of the Click event for the button.

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Forms;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Report;

...

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    exp : IScene3DExporter;
    tab : ITabObject;
    mb : IMEtabase;
Begin
    mb := Self.Metabase;
    exp := New Scene3DExporter.Create();
    exp.Scene3D := ((mb.ItemById["Rep_1"].Bind() As IPrxReport).sheets.item[0As IPrxTable).TabSheet.Objects.Item[0].Extension As Chart3D;
    exp.PixelHeight := 500;
    exp.PixelWidth := 500;
    exp.ExportToFile("C:\temp\1.jpg","jpg");
    exp.GetBitmap().SaveToFile("C:\2.jpg");
    exp.Scale := 0.5;
End Sub;

Clicking the button loads the graphic image of the 3D scene the file to be used in the regular report with the specified height and width in pixels and the specified scale.

See also:

IScene3DExporter