d = dist.getLowerLeftCorner();
g2d.drawImage(buf.getSubimage(s.x, s.y, s.width, s.height), null, d.x, d.y);
s = src.getLeft();
d = dist.getLeft();
TexturePaint t = new TexturePaint(buf.getSubimage(s.x, s.y, s.width, s.height), s);
g2d.setPaint(t); fillRect(g2d, d);
s = src.getRight();
d = dist.getRight();
t = new TexturePaint(buf.getSubimage(s.x, s.y, s.width, s.height), s);
g2d.setPaint(t); fillRect(g2d, d);
s = src.getTop();
d = dist.getTop();
t = new TexturePaint(buf.getSubimage(s.x, s.y, s.width, s.height), s);
g2d.setPaint(t); fillRect(g2d, d);
s = src.getBottom();
d = dist.getBottom();
t = new TexturePaint(buf.getSubimage(s.x, s.y, s.width, s.height), s);
g2d.setPaint(t); fillRect(g2d, d);
s = src.getCenter();
d = dist.getCenter();
t = new TexturePaint(buf.getSubimage(s.x, s.y, s.width, s.height), s);
g2d.setPaint(t); fillRect(g2d, d);
}