←Select platform

RenderOnImage Method

Summary
Renders the container into the specified image.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public abstract RasterImage RenderOnImage( 
   AnnContainer container, 
   RasterImage inputImage 
) 
- (LTRasterImage *)renderOnImage:(LTRasterImage *)inputImage container:(LTAnnContainer *)container NS_SWIFT_NAME(render(on:container:)); 
public abstract RasterImage renderOnImage(AnnContainer container, RasterImage inputImage) 
public:  
   virtual RasterImage^ RenderOnImage( 
      AnnContainer^ container, 
      RasterImage^ inputImage 
   ) abstract 
def RenderOnImage(self,container,inputImage): 

Parameters

container
The source AnnContainer to be rendered.

inputImage
The target Leadtools.RasterImage.

Return Value

The result image containing the original image data plus the objects of the contaner overlaid on top.

Remarks

RenderOnImage can be used to quickly render an annotation to a destination image. The method will automatically renders 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 RenderOnImage.

  • 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 RenderOnImage and then re-set the original value.

This method returns the same  inputImage reference.

Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Engine Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.