IWxView.DrawOnGraphics

Syntax

DrawOnGraphics(Graphics: IGxGraphics);

Parameters

Graphics. Graphical context.

Description

The DrawOnGraphics method draws a workspace within a graphical context.

Example

Executing the example requires an existing ws object of the IWxWorkspace type.

Sub UserProc;

Var

ws: IWxWorkspace;

view : IWxView;

Image : IGxImage;

Graph: IGxGraphics;

Begin

view := ws.Views.Item(0);

Image := GxBitmap.CreateNew(200, 200, GxPixelFormat.Unknown);

Graph := GxGraphicsClass.FromImage(Image);

view.DrawOnGraphics(Graph);

Image.SaveToFile("C:\WSP.jpg");

End Sub UserProc;

After executing the example the part of workspace image of defined size is saved to the WSP.jpg file.

See also:

IWxView