void ScaleWrapBlit(int dx, int dy, Image srcimg, int dw, int dh, Image dest) { Image img = NewImage(dw, dh); Blitter b = new Blitter(img); b.TClear(); b.ScaleBlit(srcimg, 0, 0, dw, dh); int mx = dx - (dw / 2); int my = dy - (dh / 2); if (mx < 0) mx += 255; if (my < 0) my += 255; b = new Blitter(dest); BlitWrap(b, img, mx, my); img.Dispose(); }