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 in the xHTML.Modifier and Type | Method and Description |
---|---|
static Img |
build(BaseHtmlElement htmlXmlContent,
double width,
double height)
Creates an image to apply to canvas with the HTML content (passed as DOM element) and width and height of the resulted image.
|
static Img |
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 Img build(BaseHtmlElement 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 in the xHTML.htmlXmlContent
- DOM element which represents the XML content to showwidth
- width of image to be createdheight
- height of image to be createdpublic static Img 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 in the 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