Nalin Jayasuriya
10/17/2004 9:39:00 AM
Some more details about this issue...
If I try the following on a ''Windows.Form'', the following work ok. I am
trying this on the graphics surface during a ''PrintPage'' in a PrintPreview.
I wonder whether it''s to do with the Graphics surface returned by the
PrintPage event?
Thanks!
"Nalin Jayasuriya" wrote:
> Hi,
>
> I have created a Metafile (in GraphicsUnit.Points units). I need to play
> back portions of the contents of this Metafile. Playing back the whole file
> works ok.
>
> I used the ''EnumerateMetafile'' method and specified the source and
> destination rectangles. No source or destination rectangle selection happens,
> the whole image gets drawn!
>
> I have included part of the playback code. Does anyone have any idea why
> this doesn''t work the way I expect it to?
>
> Sample:
>
> graphicsSurface.EnumerateMetafile(m_metaFile1
> , new Rectangle(200,400, 100, 200)
> , new Rectangle(300,400, 100, 200)
> , GraphicsUnit.Point
> , m_delegate);
>
> Also, even in the simplest ''EnumerateMetafile'' method (as shown) below, the
> destination-point get''s ignored!.
>
> [C#]
> public void EnumerateMetafile(
> Metafile metafile,
> Point destPoint,
> Graphics.EnumerateMetafileProc callback
> );
>
> Please reply if you know the reason!
>
>
> Thanks!
>
> --------------------------------
> From: Nalin Jayasuriya