GetBitmap: IGxBitmap;
The GetBitmap method returns graphical image of a workspace.
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(10, 10);
Arrow.LastPoint := New GxPointF.Create(3, 19);
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: