Please enable JavaScript to view this site.

KOL/MCK - User Guide

TMetafile = object( TObj )

Object type to encapsulate metafile image.

 

type PMetafile = ^TMetafile;

 

type

TMetafileHeader = packed record

   Key: Longint;

   Handle: SmallInt;

   Box: TSmallRect;

   Inch: Word;

   Reserved: Longint;

   CheckSum: Word;

 end;

 

const

WMFKey = Integer($9AC6CDD7);

WMFWord = $CDD7;

 

 

Metafile Properties

 

property Handle: THandle;

Returns handle of enchanced metafile.

 

property Width: Integer;

Native width of the metafile.

 

property Height: Integer;

Native height of the metafile.

 

 

Metafile Methods

 

destructor Destroy; virtual;

 

procedure Clear;

 

function Empty: Boolean;

Returns TRUE if empty

 

function LoadFromStream( Strm: PStream ): Boolean;

Loads emf or wmf file format from stream.

 

function LoadFromFile( const Filename: AnsiString ): Boolean;

Loads emf or wmf from stream.

 

procedure Draw( DC: HDC; X, Y: Integer );

Draws enchanced metafile on DC.

 

procedure StretchDraw( DC: HDC; const R: TRect );

Draws enchanced metafile stretched.

 

function NewMetafile: PMetafile;

Creates metafile object.

 

function ComputeAldusChecksum(var WMF: TMetafileHeader): Word;

 

function SetEnhMetaFileBits(p1: UINT; p2: PAnsiChar): HENHMETAFILE; stdcall;

 

function PlayEnhMetaFile(DC: HDC; p2: HENHMETAFILE; const p3: TRect): BOOL; stdcall;

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC