public class SVGInfo extends Object
To handle class definition renaming to make the SVG class names unique when the SVG is inlined in the HTML, the jStyleParser is used.
Modifier and Type | Field and Description |
---|---|
double |
height
The height of the SVG.
|
double |
width
The width of the SVG.
|
Modifier and Type | Method and Description |
---|---|
static SVGInfo |
fromDefinition(File file)
Creates the SVG inform from the SVG definition.
|
static SVGInfo |
fromDefinition(SVGDefinition def)
Creates the SVG inform from the SVG definition.
|
double |
getHeight()
Gets the width of the SVG.
|
String |
getKStringSVG(ClientImageData cid,
KStringHTMLImageTag source,
IKStringInfoProvider provider)
Appends the SVG definition to a KString tag.
|
String |
getSVGForHTML()
Returns the SVG used in the HTML.
|
double |
getWidth()
Gets the width of the SVG.
|
String |
getXMLString()
Gets the XML string.
|
boolean |
hasViewBox()
Returns the a viewbox is present in XML SVG.
|
void |
setScale(int cx,
int cy)
Sets the requested scaled width and height.
|
void |
updateFromDefinition(SVGDefinition def)
Updates the requested size from the definition.
|
public final double width
public final double height
public static SVGInfo fromDefinition(File file)
file
- The file.public static SVGInfo fromDefinition(SVGDefinition def)
def
- The SVG definition.public void updateFromDefinition(SVGDefinition def)
def
- The definition.public void setScale(int cx, int cy)
cx
- The requested width.cy
- The requested height.public String getXMLString()
public double getWidth()
public double getHeight()
public String getSVGForHTML()
public boolean hasViewBox()
public String getKStringSVG(ClientImageData cid, KStringHTMLImageTag source, IKStringInfoProvider provider)
cid
- The client image data instance.source
- The source KString tag.provider
- The information provider.iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.