IWxViewExporter.GetBitmap

Syntax

GetBitmap: IGxBitmap;

Description

The GetBitmap method returns graphical image of a workspace.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1. The workspace must contain several objects.

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

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    view: IWxView;
    Exp: IWxViewExporter;
    arrow: IWxArrow;
    ellipse: IWxEllipse;
Begin
    ws := UiWorkspace1.WxWorkspace;
    view := ws.Views.Item(0);
    ellipse := ws.CreateEllipse;
    arrow := ws.CreateArrow;
    Arrow.FirstPoint := New GxPointF.Create(1010);
    Arrow.LastPoint := New GxPointF.Create(319);
    Exp := New WxViewExporter.Create;
    Exp.WxView := View;
    ImageBox1.Image := Exp.GetBitmap;
End Sub Button1OnClick;

After executing this example, graphical image of the workspace, displayed in the WorkspaceBox1 component is loaded into the ImageBox1 component.

See also:

IWxViewExporter