public final class AnnotationBuilder extends Object
svg+mxl and foreignObject elements.
<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}">
<foreignObject width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml">
... HTML XML well-formed content ....
</div>
</foreignObject>
</svg>
Drawing the image on canvas, you could get the java script error NS_ERROR_NOT_AVAILABLE which means that if even
the content is well-formed, it contains some invalid characters, not allowed into xHTML.| Modifier and Type | Method and Description |
|---|---|
static ImageElement |
build(Element htmlXmlContent,
double width,
double height)
Creates an image to apply to canvas with the HTML content (passed as GWT element) and width and height of the resulted
image.
|
static ImageElement |
build(String htmlXmlContent,
double width,
double height)
Creates an image to apply to canvas with the HTML content (MUST BE XML well-formed) and width and height of the resulted
image.
|
public static ImageElement build(Element htmlXmlContent, double width, double height)
NS_ERROR_NOT_AVAILABLE which means
that if even the content is well-formed, it contains some invalid characters, not allowed into xHTML.htmlXmlContent - GWT element which represents the XML content to showwidth - width of image to be createdheight - height of image to be createdpublic static ImageElement build(String htmlXmlContent, double width, double height)
NS_ERROR_NOT_AVAILABLE which means
that if even the content is well-formed, it contains some invalid characters, not allowed into xHTML.htmlXmlContent - HTML content to apply on canvas, must be XML well-formedwidth - width of image to be createdheight - height of image to be created