X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fplat%2FJava2.java;h=0efff6789a268b9fa3251b93f500cb59c88f769e;hb=0e968409891819d0015489c20427bcbfc8378f6a;hp=fd6b216d699eb1addaab2b4ead1a9457009ddf52;hpb=297fdbde87e6db4732448a0950d1141c7265c169;p=org.ibex.core.git diff --git a/src/org/ibex/plat/Java2.java b/src/org/ibex/plat/Java2.java index fd6b216..0efff67 100644 --- a/src/org/ibex/plat/Java2.java +++ b/src/org/ibex/plat/Java2.java @@ -21,13 +21,6 @@ public class Java2 extends AWT { protected String getDescriptiveName() { return "Java 1.2+ JVM"; } public Java2() { - // Properties for Apple JDK 1.3 - System.setProperty("apple.awt.showGrowBox", "false"); - System.setProperty("com.apple.hwaccel", "true"); - System.setProperty("com.apple.forcehwaccel", "true"); - System.setProperty("apple.awt.window.position.forceSafeUserPositioning", "true"); - System.setProperty("apple.awt.window.position.forceSafeCreation", "true"); - // disable the focus manager so we can intercept the tab key javax.swing.FocusManager.setCurrentManager(new javax.swing.FocusManager() { public void processKeyEvent(Component focusedComponent, KeyEvent anEvent) { } @@ -123,6 +116,24 @@ public class Java2 extends AWT { private static int[] ys = new int[65535]; private static GeneralPath gp = new GeneralPath(); + // this doens't seem to work on Windows + public void drawGlyph(org.ibex.graphics.Font.Glyph source, Affine a, Hull h, int rgb, int bg) { + Image i = ((AWTGlyph)source).getImage(); + Image i2 = ((AWTGlyph)source).i2; + if (((AWTGlyph)source).i2 == null) { + ((AWTGlyph)source).i2 = new BufferedImage(i.getWidth(null), i.getHeight(null), BufferedImage.TYPE_INT_ARGB); + i2 = ((AWTGlyph)source).i2; + i2.getGraphics().drawImage(i, 0, 0, null); + } + Graphics2D g = (Graphics2D)((AWTGlyph)source).i2.getGraphics(); + g.setComposite(AlphaComposite.SrcIn); + g.setColor(new java.awt.Color((rgb & 0x00FF0000) >> 16, (rgb & 0x0000FF00) >> 8, (rgb & 0x000000FF))); + g.fillRect(0, 0, i2.getWidth(null), i2.getHeight(null)); + Graphics2D g2 = (Graphics2D)this.i.getGraphics().create(); + g2.transform(new java.awt.geom.AffineTransform(a.a, a.b, a.c, a.d, a.e, a.f)); + g2.drawImage(i2, 0, 0, null); + } + public void fill(org.ibex.graphics.Polygon p, org.ibex.graphics.Paint paint) { fillStroke(p, paint, true, false); } public void stroke(org.ibex.graphics.Polygon p, org.ibex.graphics.Paint paint) { fillStroke(p, paint, false, true); } public void fillStroke(org.ibex.graphics.Polygon p, org.ibex.graphics.Paint paint, boolean fill, boolean stroke) {