Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified sources/net.sf.j2s.core/dist/swingjs/SwingJS-site.zip
Binary file not shown.
Binary file modified sources/net.sf.j2s.core/dist/swingjs/net.sf.j2s.core.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/dist/swingjs/timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20181213165944
20181216002450
Binary file modified sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/SwingJS-site.zip
Binary file not shown.
Binary file modified sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/net.sf.j2s.core.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20181213165944
20181216002450
Binary file modified sources/net.sf.j2s.java.core/dist/SwingJS-site.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions sources/net.sf.j2s.java.core/src/swingjs/JSGraphics2D.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ private void drawDirect(int[] pixels, int x, int y, int width, int height, boole
buf8[pt++] = argb & 0xFF;
buf8[pt++] = (isRGB ? 0xFF : (argb >> 24) & 0xFF);
}
double[] m = HTML5CanvasContext2D.getMatrix(ctx, transform);
if (m[0] != 1 || m[1] != 0 || m[2] != 0 || m[3] != 1)
System.err.println("Unsupported transform");
x += m[4];
y += m[5];
HTML5CanvasContext2D.putImageData(ctx, imageData, x, y);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package swingjs.api.js;

import java.awt.geom.AffineTransform;

public abstract class HTML5CanvasContext2D {

public abstract void beginPath();
Expand Down Expand Up @@ -193,5 +195,18 @@ public static void setFillStyle(HTML5CanvasContext2D ctx, String s) {
{}
}

public static double[] getMatrix(HTML5CanvasContext2D ctx, AffineTransform transform) {
double[] m = /** @j2sNative ctx._m || */ null;
if (m == null) {
m = new double[6];
/**
* @j2sNative
* ctx._m = m;
*/
transform.getMatrix(m);
}
return m;
}


}