Visit Gigasoft's Web Site
ProEssentials v8 Help

Common Question 32

I'm using the PlayMetafile function and graphics are getting drawn outside the image. Or, I'm exporting a zoomed metafile and graphics are getting drawn outside the image?

The ClipAxesInMetafiles property set to TRUE can help with Multi Axes if MultiAxisStyle is set to SeparateAxes.

 

Setting the LogicalLimit property to zero may prevent this problem.

 

In the case of low level printing via playing the metafile to a DC, you have another option of establishing a clipping region before playing the metafile. And this is the recommended approach.  See the bottom section within  printing.

  • You will use CreateRectRgn which will return a handle to a region. Use the rect coordinates which identify the same location defined with SetViewportOrg and SetViewportExt.
  • Next, call SelectClipRgn with the region handle just created.
  • Next, call the PEplaymetafile function as normal.
  • And finally, don't forget to call DeleteObject on the recently constructed region handle.