ImageGear .NET v25.2 - Updated
ImageGear.Presentation Assembly / ImageGear.Display Namespace / ImGearPresentationPageDisplay Class / DrawToCanvas Method / DrawToCanvas(IImGearScrollableView,Canvas,ImGearRenderSettings) Method
A Scrollable View object that defines image position.
Canvas object in which to draw the image.
Specifies rendering settings, such as scale mode and resolution.




In This Topic
    DrawToCanvas(IImGearScrollableView,Canvas,ImGearRenderSettings) Method
    In This Topic
    Draws an image in a Canvas. If ImGearPresentationPageDisplay class object contains annotations attached to it, the method optionally draws the annotations as well.
    Syntax
    'Declaration
     
    Public Overloads Sub DrawToCanvas( _
       ByVal pageView As IImGearScrollableView, _
       ByVal canvas As Canvas, _
       ByVal renderSettings As ImGearRenderSettings _
    ) 
    'Usage
     
    Dim instance As ImGearPresentationPageDisplay
    Dim pageView As IImGearScrollableView
    Dim canvas As Canvas
    Dim renderSettings As ImGearRenderSettings
     
    instance.DrawToCanvas(pageView, canvas, renderSettings)
    public void DrawToCanvas( 
       IImGearScrollableView pageView,
       Canvas canvas,
       ImGearRenderSettings renderSettings
    )
    public: void DrawToCanvas( 
       IImGearScrollableView* pageView,
       Canvas* canvas,
       ImGearRenderSettings* renderSettings
    ) 
    public:
    void DrawToCanvas( 
       IImGearScrollableView^ pageView,
       Canvas^ canvas,
       ImGearRenderSettings^ renderSettings
    ) 

    Parameters

    pageView
    A Scrollable View object that defines image position.
    canvas
    Canvas object in which to draw the image.
    renderSettings
    Specifies rendering settings, such as scale mode and resolution.
    Remarks

    An Image element is created and positioned within the canvas based on the pageView parameter. The method supports passing specific resolution for rendering, or scaling the image with the help of the WPF engine.

    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