1
这是说,DOMException - with error code NOT_SUPPORTED_ERR if the requested trait is not supported on this element or null.
为什么getMatrixTrait(“transform”)会抛出DOMException:NOT_SUPPORTED_ERR?
我想水平翻转我的SVG图像,但我坚持这个错误。
InputStream svgStream = getClass().getResourceAsStream(path);
SVGImage svgImage = (SVGImage) (SVGImage.createImage(svgStream, null));
SVGSVGElement myEl = (SVGSVGElement) svgImage.getDocument().getDocumentElement());
SVGMatrix transformMatrix = myEl.getScreenCTM();
transformMatrix = transformMatrix.mTranslate(100f, 0f);
myEl.setMatrixTrait("transform", transformMatrix);
谢谢!你能提供一个这样的例子吗? – scythargon 2013-03-06 09:28:24