- public void setClip(int x, int y, int x2, int y2) {
- clipx = x; if (clipx < 0) clipx = 0;
- clipy = y; if (clipy < 0) clipy = 0;
- clipw = x2 - x; if (clipw < 0) clipw = 0;
- cliph = y2 - y; if (cliph < 0) cliph = 0;
- }
-
- public void drawPictureAlphaOnly(Picture source, int dx1, int dy1, int dx2, int dy2,
- int sx1, int sy1, int sx2, int sy2, int rgb) {
- slowDrawPicture(source, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, rgb, true);
+ public void drawGlyph(Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) {
+ cx1 = Math.max(dx, cx1);
+ cy1 = Math.max(dy, cy1);
+ cx2 = Math.min(dx + source.width, cx2);
+ cy2 = Math.min(dy + source.height, cy2);
+ if (cx1 >= cx2 || cy1 >= cy2) return;
+ X11Picture pic = (X11Picture)((Platform.DefaultGlyph)source).getPicture();
+ pic.init();
+ slowDrawPicture(pic, dx, dy, cx1, cy1, cx2, cy2, rgb, true);