Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEgetenhancedmeta Method

Scope All ProEssentials Interfaces

 

PEgetenhancedmeta (nWidth As Integer, nHeight As Integer, nEmfType As eEmfType, nEmfDC As eEmfDC, bEmfBitmapGradients As Boolean) As Long

 

Parameter

Description

nWidth

Width in 1/100th millimeters. The dimensions must not equal zero. To insure image quality, the aspect ratio (width/height) must be between 0.333 and 10.0

nHeight

Height in 1/100th millimeters. The dimensions must not equal zero. To insure image quality, the aspect ratio (width/height) must be between 0.333 and 10.0

nEmfType

PEET_EMF_GDI (0)

Legacy GDI enhanced metafile, converted via GDIPlus to simulate GDIPlus within GDI . Highly supported.

Dual format: renders as GdiPlus if available, else renders as Gdi if GdiPlus is not available. File size is usually quite large. MS Office and Adobe supported, though large sized fonts tend to be quirky. Test for Adobe support if you want to print to a PDF. Hopefully Microsoft will improve their poor support for this image format.

Renders as GdiPlus only. File size is very small. GdiPlus must be present and this format has limited support. MS Office/Adobe may not fully support. Test thoroughly if using this setting. Hopefully more support will arrive as file-size and image-quality is best within this format.

nEmfDC

PEEDC_DISPLAY_DPI_ADJ (0)

Uses the current video display Device Context. Metafile header is not modified, and DPI of the metafile will match the DPI of the video display. Best if export will only be viewed on a monitor and never printed.

Uses the current default printer driver. This setting may be the best solution if ExportImageDpi will be set to 300 DPI.

bEmfBitmapGradients

If True, file sizes may be large and radial gradients may show artifacts when nEmfType is 0. Linear gradients are well supported. If False and BitmapGradientMode = True, then the background region will be transparent. In this case, it's best to use black or dark colored chart text.

 

This function returns a handle HENHMETAFILE for the current image. It is recommended that ExportImageDPI is set to 300 DPI.

 

You generally need to delete this handle when finished with it via the Windows DeleteMetafile function.

 

Returns

An Long representing a HENHMETAFILE of a metafile containing image.

 

Comments

Rarely needed, but the return value can be used with the Windows PlayEnhMetafile API call.

 

See Also: PEcopyemftofile Method, OCX Methods, PEcopyemftoclipboard.