public void Draw(VertexGraphics g) { for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { g.DrawPoint(x, y, image[x, y]); } } }
public void DrawClipped(VertexGraphics g, float x1, float y1, float x, float y, float w, float h) { if (x >= 0 && x < this.w && y >= 0 && y < this.h && x + w < this.w && x + w >= 0 && y + h < this.h && y + h >= 0) { for (int y0 = (int)y; y0 < y + h; y0++) { for (int x0 = (int)x; x0 < x + w; x0++) { g.DrawPoint(x1 + (x0 - x), y1 + (y0 - y), image[x0, y0]); } } } }