Class TDrawMetaFile (unit xyMeta)

Inherits from

TMetaFile

this unit was orignally called unit DrawMeta; I have renamed it so that it is easily identified with xyGraph. If you already have DrawMeta you might want to delete this and change the uses clause in xyGraph to use drawmeta. Note that this file is only required for D1.0} {--- make a drawable metafile ---} { Grahame Marsh Jan 1996

Constructors


constructor Create (aWidth, aHeight : integer);

create our drawing metafile, take the drawing width and height to those } { given in the parameters, set the inch property to that found in } { screens.


Functions

procedure Close;


destructor Destroy;

before destroying the metafile ensure that it is closed, this means } { that any canvas is destroyed

procedure Open;


procedure SetDrawing (State : boolean);

The key method: puts the metafile into draw and use modes depending on } { the boolean parameter.

Properties

property Canvas : TCanvas


property Drawing : boolean


Events

Variables

FCanvas : TCanvas;


FDrawing : boolean;



Constructors


constructor Create (aWidth, aHeight : integer);

create our drawing metafile, take the drawing width and height to those } { given in the parameters, set the inch property to that found in } { screens.pixelsperinch and finally open for drawing


Functions


procedure Close;


destructor Destroy;

before destroying the metafile ensure that it is closed, this means } { that any canvas is destroyed


procedure Open;


procedure SetDrawing (State : boolean);

The key method: puts the metafile into draw and use modes depending on } { the boolean parameter. When true the metafile goes into draw mode by } { putting a CreateMetafile device context into a Canvas handle property } { the canvas can now be drawn on. When false the metafile goes into use } { mode by putting the handle returned from the CloseMetafile call into } { the metafile's handle property. Note that the width, height and inch } { properties are preserved over this assignment. Finally the canvas is } { freed.


Properties


property Canvas : TCanvas


property Drawing : boolean


Events


Variables


FCanvas : TCanvas;


FDrawing : boolean;