>Dear All,
>
>I have noticed that draw method of ImageCanas class now accepts 3rd parameter for oGfx drawing object.
>This is extremely cool as it alows you to execute drawing from some existing ImageCanvas to any desired
>graphic context/device.
>
>However, problem is that drawing is happening at topleft corner of screen (position 0/0 in pixels)
>whereas I would like to make it happen at specific position (given rectangle).
>
>Is there any possibility (property or method) to offset this drawing to a specific nOffTop,nOffLeft position.
>
>Bo, Craig, Cesar anyone ?
>
>TIA
>
>Sergio
>
>
Hi Sergio,
Haven't tried yet, but probably works:
You can use the
xfcGraphics.TranslateTransform Functions
See:
Graphics.TranslateTransform method
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.translatetransform(VS.80).aspxThis command changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this Graphics.
So, you could use:
This.oGfx.TranslateTransform(20, 50)
You may also create your own transformation matrix, and send it to the Graphics object:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.transform(VS.80).aspxHope this helps !
Regards
Cesar