Image Output

[Top]  [Chapter]  [Previous]  [Next]

wPDFControl provides the function DrawImage() with several alternatives to draw a metafile or a bitmap.

 

If no page has been opened with StartPage a page will be automatically opened in either the DefaultPageSIze, or, if ZoomValue is not 0 to match the (zoomed) size of the image or metafile.

 

Possible Parameters:

 

image :        This is the Image instance with a bitmap or metafile

FileName:        an image file on disc

x,y,w,h :        This is the location the image should be drawn on the PDF page - measure in pt (1/72 inch)

ZoomValue:        This value (if not 0) can be used to resize the image.

         This is useful if the image should be drawn in correct aspect ratio

 

public int DrawImage(String FileName)

public int DrawImage(String FileName, int ZoomValue)

public int DrawImage(String FileName, int x, int y, int w, int h)

public int DrawImage(Image image)

public int DrawImage(Image image, int ZoomValue)

public int DrawImage(Image image, int x, int y, int w, int h)

 

Speciality for metafiles only: - DrawMetafile let you specify the x and y resolution which was used to create the metafile.

This can be useful if the PDFEngine does not pick up the stretching value correctly. (This function implies the ZoomValue set to 100)

 

public void DrawMetafile(Metafile metafile, int xres, int yres)

 


[imageoutput.htm]    Copyright © 2007 by WPCubed GmbH