Commit 932a3dc5 authored by Stefan Sechelmann's avatar Stefan Sechelmann
Browse files

update itext library to support texture matrices

parent 652d7675
......@@ -29,8 +29,8 @@
<classpathentry kind="lib" path="lib/jogamp/jogl-all.jar"/>
<classpathentry kind="lib" path="lib/jtem/beans.jar"/>
<classpathentry kind="lib" path="lib/jreality/jReality.jar" sourcepath="/jreality"/>
<classpathentry kind="lib" path="lib/itext/itextpdf-5.5.0.jar"/>
<classpathentry kind="lib" path="lib/itext/itext-pdfa-5.5.0.jar"/>
<classpathentry kind="lib" path="lib/itext/itext-xtra-5.5.0.jar"/>
<classpathentry kind="lib" path="lib/itext/itext-pdfa-5.5.5.jar"/>
<classpathentry kind="lib" path="lib/itext/itext-xtra-5.5.5.jar"/>
<classpathentry kind="lib" path="lib/itext/itextpdf-5.5.5_dgdgitlab.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -61,9 +61,9 @@
<pathelement location="${lib}/jreality/colorpicker.jar"/>
</path>
<path id="itext.libraryclasspath">
<pathelement location="${lib}/itext/itextpdf-5.5.0.jar"/>
<pathelement location="${lib}/itext/itext-pdfa-5.5.0.jar"/>
<pathelement location="${lib}/itext/itext-xtra-5.5.0.jar"/>
<pathelement location="${lib}/itext/itextpdf-5.5.5_dgdgitlab.jar"/>
<pathelement location="${lib}/itext/itext-pdfa-5.5.5.jar"/>
<pathelement location="${lib}/itext/itext-xtra-5.5.5.jar"/>
</path>
<path id="junit.libraryclasspath">
<pathelement location="${lib}/junit/junit-4.11.jar"/>
......
......@@ -26,8 +26,11 @@ public class AffineTexturePaint extends TexturePaint {
public void setTransformationPath(SceneGraphPath path) {
this.transformationPath = path;
}
public SceneGraphPath getTransform() {
return transformationPath;
public AffineTransform getTextureTransform() {
EffectiveAppearance app = EffectiveAppearance.create(transformationPath);
Matrix texMatrix = (Matrix)app.getAttribute("polygonShader.texture2d:textureMatrix", new Matrix());
double[] texArr = texMatrix.getArray();
return new AffineTransform(texArr[0], texArr[4], texArr[1], texArr[5], texArr[3], texArr[7]);
}
@Override
......@@ -38,10 +41,7 @@ public class AffineTexturePaint extends TexturePaint {
AffineTransform xform,
RenderingHints hints
) {
EffectiveAppearance app = EffectiveAppearance.create(transformationPath);
Matrix texMatrix = (Matrix)app.getAttribute("polygonShader.texture2d:textureMatrix", new Matrix());
double[] texArr = texMatrix.getArray();
AffineTransform T = new AffineTransform(texArr[0], texArr[4], texArr[1], texArr[5], texArr[3], texArr[7]);
AffineTransform T = getTextureTransform();
try {
T.invert();
} catch (NoninvertibleTransformException e) { }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment