VectorImageInterface Class Reference

#include <gfx_image_vector.h>

Inheritance diagram for VectorImageInterface:

Detailed Description

The VectorImageInterface represents a vector image (internally SVG). This class wraps the vector image into a ImageBaseRef. The draw functions then extract that and draw the image as vector image.

Public Member Functions

MAXON_METHOD Result< void > Init (const Url &url)
 
MAXON_METHOD Result< void > Init (const SVGDocument &svgDocument)
 
MAXON_METHOD const UrlGetUrl () const
 
MAXON_METHOD Result< ForwardRef< SVGDocument > > GetSVGDocument () const
 

Private Member Functions

 MAXON_INTERFACE (VectorImageInterface, MAXON_REFERENCE_NORMAL, "net.maxon.image.interface.vectorimage")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( VectorImageInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.image.interface.vectorimage"   
)
private

◆ Init() [1/2]

MAXON_METHOD Result<void> Init ( const Url url)

Initialized the Vector image with the given url of an svg image.

Parameters
[in]urlUrl of a svg file to load.
Returns
OK on success.

◆ Init() [2/2]

MAXON_METHOD Result<void> Init ( const SVGDocument &  svgDocument)

Initializes the image with a SVGDocument.

Parameters
[in]svgDocumentThe image.
Returns
OK on success.

◆ GetUrl()

MAXON_METHOD const Url& GetUrl ( ) const

GetUrl returns the url of the image.

◆ GetSVGDocument()

MAXON_METHOD Result<ForwardRef<SVGDocument> > GetSVGDocument ( ) const

GetSVGDocument returns the SVGDocument connected to this image.