0

google 最有帮助的结果是this,但在 JavaME 的 SVGMatrix 类中没有scale()两个参数可以与此类似:

TinyMatrix transform = (TinyMatrix) node.getAttribute(SVG.ATT_TRANSFORM);
transform.scale(-(1<<Tiny2D.DFIX_BITS), 1<<Tiny2D.DFIX_BITS );

可能可以通过定义我自己的矩阵进行翻转然后使用mMultiply()方法来做一些事情,但我也无法在 net.xml 中找到示例。

4

1 回答 1

0

好的,我自己解决了,可以使用嵌入的 SVG 属性进行翻转:

SVGImage svgImage = (SVGImage) this.frames.elementAt(i);
Document doc = svgImage.getDocument();
SVGSVGElement svg = (SVGSVGElement) doc.getDocumentElement();
SVGElement image = (SVGElement) doc.getElementById("image");
SVGElement group = (SVGElement) doc.createElementNS(SVG_NAMESPACE_URI, "g");
group.appendChild(image);
group.setTrait("transform", "translate(200,200) scale(-1,1)");
svg.appendChild(group);
于 2013-03-07T08:03:57.070 回答