Vcl.Graphics.TMetafileCanvas.CreateWithComment

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor CreateWithComment(AMetafile: TMetafile; ReferenceDevice: HDC;  const CreatedBy, Description: String);

Properties

Type Visibility Source Unit Parent
constructor public Vcl.Graphics.pas Vcl.Graphics TMetafileCanvas

Description

Creates an instance of TMetafileCanvas and acquires a handle to a metafile device context with a comment string.

Call CreateWithComment to create an instantiate a TMetafileCanvas object for a metafile that will receive the CreatedBy and Description strings. CreateWithComment sets the size of the TMetafile object from the ReferenceDevice if it does not already have the MMHeight and MMWidth properties set. Create then creates a metafile device context using the CreatedBy and Description strings as a description, and sets the Handle property to its handle. All subsequent drawing methods will draw to the metafile device context.

When the TMetafileCanvas is destroyed, the CreatedBy and Description strings are used to set the properties of the same name in the TMetafile object.

See Also