Hi
!
I'm currently
experimenting with FlowRoot-elements, and since the official 1.6-release of
Batik cdidn't seem to be able to handle removing and inserting new
flowPara-Element, I downloaded and compiled the latest SVN. But after changing
Batik-version neither flowPara-editing nor Matrix-transformations work. The
flowpara I can understand, but why would matrix-transformations suddenly stop
working? I can change text in a normal Text-object, change color, font, style.
But when I try to apply a transformation to an object using the code listed
below, the transform-attribute of the
Element changes, but the rendered object is unaffected. The same obvously goes for
skewing, rotating and scaling aswell.
The SvgElementEnh
has stored an SVGOMMatrix with the current transformation, and any change to the
transform is first applied to that matrix, and is then outputted as a
String-attribute in the Element
public static
synchronized void move(SvgElementEnh e, float moveX, float
moveY)
{
{
float newX =
e.transform.getE() + moveX;
float newY = e.transform.getF() + moveY;
e.transform.setE(newX);
e.transform.setF(newY);
e.getElement().setAttribute("transform", "matrix("+ String.valueOf(e.transform.getA()) +" "+ String.valueOf(e.transform.getB()) +" "+ String.valueOf(e.transform.getC()) +" "+ String.valueOf(e.transform.getD()) +" "+ String.valueOf(e.transform.getE()) +" "+ String.valueOf(e.transform.getF()) +")");
}
float newY = e.transform.getF() + moveY;
e.transform.setE(newX);
e.transform.setF(newY);
e.getElement().setAttribute("transform", "matrix("+ String.valueOf(e.transform.getA()) +" "+ String.valueOf(e.transform.getB()) +" "+ String.valueOf(e.transform.getC()) +" "+ String.valueOf(e.transform.getD()) +" "+ String.valueOf(e.transform.getE()) +" "+ String.valueOf(e.transform.getF()) +")");
}
What am I doing
wrong?
Regards
Henric
Rosvall
