JavaME:如何水平/垂直翻转svg图像?

JavaME:如何水平/垂直翻转svg图像?,java,java-me,matrix,svg,Java,Java Me,Matrix,Svg,google最有用的结果是,但是在JavaME的SVGMatrix类中没有带两个参数的scale() TinyMatrix transform = (TinyMatrix) node.getAttribute(SVG.ATT_TRANSFORM); transform.scale(-(1<<Tiny2D.DFIX_BITS), 1<<Tiny2D.DFIX_BITS ); TinyMatrix transform=(TinyMatrix)node.getAttribut

google最有用的结果是,但是在JavaME的SVGMatrix类中没有带两个参数的
scale()

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

transform.scale(-(1好的,我自己解决了,flip可以使用嵌入的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);