-
- public void drawPicture(Picture source, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2) {
- _doDrawImage(g, ((AWTPicture)source).i, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
+ private WritableRaster raster = null;
+ private SampleModel sm = null;
+ private DataBuffer buf = null;
+
+ // this doens't seem to work on Windows
+ public void drawGlyph(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) {
+ AWTPicture src = (AWTPicture)source;
+ src.init();
+ Graphics2D g2 = (Graphics2D)i.getGraphics();
+ g2.setComposite(AlphaComposite.DstOut);
+ g2.setClip(cx1, cy1, cx2 - cx1, cy2 - cy1);
+ g2.drawImage(src.i, dx, dy, null);
+ g2.setComposite(AlphaComposite.DstOver);
+ g2.setColor(new Color((rgb & 0x00FF0000) >> 16, (rgb & 0x0000FF00) >> 8, (rgb & 0x000000FF)));
+ g2.fillRect(dx, dy, cx2 - dx, cy2 - dy);
+ g2.drawImage(i, 0, 0, null);
+ g2.setClip(0, 0, i.getWidth(null), i.getHeight(null));