Error processing SSI file
LEADTOOLS Leadtools.Documents (Leadtools.Documents assembly)

Show in webframe

GetSvgBackImage(RasterColor) Method






Color to use to fill the background of the image.
Gets a raster image that represents contains only the image elements of the SVG document for this page using the default resolution.
Syntax
public RasterImage GetSvgBackImage( 
   RasterColor backColor
)
'Declaration
 
Public Overloads Function GetSvgBackImage( _
   ByVal backColor As RasterColor _
) As RasterImage
'Usage
 
Dim instance As DocumentPage
Dim backColor As RasterColor
Dim value As RasterImage
 
value = instance.GetSvgBackImage(backColor)
public RasterImage getSvgBackImage(RasterColor backColor)
            
public:
RasterImage^ GetSvgBackImage( 
   RasterColor backColor
) 

Parameters

backColor
Color to use to fill the background of the image.
Remarks

GetSvgBackImage is used to get a raster image that represents contains only the image elements of the SVG document for this page. Not all document types support this method, this depends on the value of DocumentImages.IsSvgSupported.

SetSvgBackImage is used to replace the SVG background image of the page. IsSvgBackImageModified is used to as flag that indicates that the SVG background image of this page has been replaced by the user.

This method works as follows (the "item" is the raster image passed by the user):

  1. If this document does not support SVG (the value of DocumentImages.IsSvgSupported is false), then an exception will be thrown.

  2. If an item was found in the cache, it is returned right away. This is available if the document was created using the cache system. and Document.CacheOptions contains DocumentCacheOptions.PageSvgBackImage.

  3. The SVG data for this page is loaded with everything dropped except the image elements. If the result document is empty (the page does not contain any image elements in its SVG), then null is returned.

  4. Otherwise, a new RasterImage is created and filled with backColor (if it's not a transparent color) then the SVG data containing only the image elements is rendered on the surface of this image. The size of the result raster image is the same size as this page.

  5. If this document uses the cache system (Document.HasCache is true), then the RasterImage object is saved to the cache before it is returned. Next time this method is called, the image will be returned from the cache directly without loading it from the file or creating a new instance.

GetSvgBackImage will check the cache first, hence, subsequent calls will return the value set by this method.

The value of IsSvgBackImageModified will be set to true after this method returns.

If the value of ImageScale is a value greater than 1, then the result image will have a size that is equal to Size / ImageScale.

Refer to Loading Using LEADTOOLS Documents Library for more information.

Requirements

Target Platforms

See Also

Reference

DocumentPage Class
DocumentPage Members
Overload List

Error processing SSI file
   Leadtools.Documents requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features