ImageGear .NET v25.0 - Updated
DrawToCanvas(Canvas,ImGearRenderSettings) Method




ImageGear.Presentation Assembly > ImageGear.Display Namespace > ImGearPresentationPageDisplay Class > DrawToCanvas Method : DrawToCanvas(Canvas,ImGearRenderSettings) Method
Canvas object to draw the image in.
Specifies rendering settings, such as scale mode and resolution.
Draws an image in a Canvas.
Syntax
'Declaration
 
Public Overloads Sub DrawToCanvas( _
   ByVal canvas As Canvas, _
   ByVal renderSettings As ImGearRenderSettings _
) 
'Usage
 
Dim instance As ImGearPresentationPageDisplay
Dim canvas As Canvas
Dim renderSettings As ImGearRenderSettings
 
instance.DrawToCanvas(canvas, renderSettings)
public void DrawToCanvas( 
   Canvas canvas,
   ImGearRenderSettings renderSettings
)
public: void DrawToCanvas( 
   Canvas* canvas,
   ImGearRenderSettings* renderSettings
) 
public:
void DrawToCanvas( 
   Canvas^ canvas,
   ImGearRenderSettings^ renderSettings
) 

Parameters

canvas
Canvas object to draw the image in.
renderSettings
Specifies rendering settings, such as scale mode and resolution.
Remarks

An Image element is created within the canvas based on the display settings. The application shall set Width and Height properties of the Canvas before calling this method. The method supports passing specific resolution for rendering, or scaling the image with the help of the WPF engine. If ImGearPresentationPageDisplay class object contains annotations attached to it, the method optionally draws the annotations as well.

When using this method for printing, the application shall explicitly call Measure and Arrange methods of the canvas after calling the DrawToCanvas method and before calling PrintDialog.PrintVisual method or XpsDocumentWriter.Write method.

See Also

Reference

ImGearPresentationPageDisplay Class
ImGearPresentationPageDisplay Members
Overload List
ImGearRenderSettings Class