示例#1
0
 public void drawMirrorImage(LImage img, int x, int y) {
   if (img != null) {
     int w = img.getWidth();
     int h = img.getHeight();
     g2d.drawImage(img.getBufferedImage(), x + w, y, x, y + h, 0, 0, w, h, null);
   }
 }
示例#2
0
 public boolean drawImage(
     LImage img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2) {
   if (img != null) {
     return g2d.drawImage(img.getBufferedImage(), dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
   }
   return false;
 }
示例#3
0
 public void drawImage(LImage img, int x, int y, int anchor) {
   if (img != null) {
     int newx = x;
     int newy = y;
     if (anchor == 0) {
       anchor = TOP | LEFT;
     }
     if ((anchor & RIGHT) != 0) {
       newx -= img.getWidth();
     } else if ((anchor & HCENTER) != 0) {
       newx -= img.getWidth() / 2;
     }
     if ((anchor & BOTTOM) != 0) {
       newy -= img.getHeight();
     } else if ((anchor & VCENTER) != 0) {
       newy -= img.getHeight() / 2;
     }
     g2d.drawImage(img.getBufferedImage(), newx, newy, null);
   }
 }
示例#4
0
 public void drawRegion(
     LImage src,
     int x_src,
     int y_src,
     int width,
     int height,
     int transform,
     int x_dst,
     int y_dst) {
   Image img = src.getBufferedImage();
   if (img != null) {
     drawRegion(img, x_src, y_src, width, height, transform, x_dst, y_dst);
   }
 }
示例#5
0
 public boolean drawImage(LImage img, int x, int y, int width, int height) {
   if (img != null) {
     return g2d.drawImage(img.getBufferedImage(), x, y, width, height, null);
   }
   return false;
 }
示例#6
0
 public boolean drawImage(LImage img, int x, int y) {
   if (img != null) {
     return g2d.drawImage(img.getBufferedImage(), x, y, null);
   }
   return false;
 }