Renders the container into the specified RenderTargetBitmap.
public IAsyncOperation<RenderTargetBitmap> RenderOnCanvas(
Leadtools.Annotations.Core.AnnContainer container,
Canvas inputCanvas
)
Public Function RenderOnCanvas( _
ByVal container As Leadtools.Annotations.Core.AnnContainer, _
ByVal inputCanvas As Canvas _
) As IAsyncOperation(Of RenderTargetBitmap)
public IAsyncOperation<RenderTargetBitmap> RenderOnCanvas(
Leadtools.Annotations.Core.AnnContainer container,
Canvas inputCanvas
)
function Leadtools.Annotations.Rendering.AnnD2DRenderingEngine.RenderOnCanvas(
container ,
inputCanvas
)
container
The source AnnContainer to be rendered.
inputCanvas
The source Canvas.
RenderOnCanvas can be used to quickly render an annotation to a destination RenderTargetBitmap. The method will automatically render the objects of the container fitted into the rectangle created by the image width and height keeping the aspect ratio. This method does not erase the content of the image, instead the objects are rendered on top of the existing pixel data.
The method can be used to quickly accomplish the following:
Render the container on a smaller image, for example to create a thumbnail: Create a smaller version of the original image at the desired size and then pass it to RenderOnCanvas.
Render the container on an image used for printing. Create a temporary image, renders the container on it and then print the result image.
Render the container on an image for saving to an external file or taking a screenshot of the current container.
RenderState can be used to control what state parts of the annotation objects are rendered. For example, you may choose not to render the lock or content pictures when creating a thumbnail, save the original value of RenderState, set it to AnnRenderState.None, call RenderOnCanvas and then re-set the original value.
This method returns the same inputCanvas reference.
Products |
Support |
Feedback: RenderOnCanvas Method - Leadtools.Annotations.Rendering |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.