public Quad(ByteImage image, int startX, int startY) { byte[][] original = image.Image; this.startX = startX; this.startY = startY; points = new byte[4][]; for(int x = startX, i = 0; x < (startX + 4); x++, i++) //it will go four steps { byte[] line = new byte[4]; for(int y = startY, j = 0; y < (startY + 4); y++, j++) line[j] = original[x][y]; points[i] = line; } }
public Quad(ByteImage image, int startX, int startY) { byte[][] original = image.Image; this.startX = startX; this.startY = startY; points = new byte[4][]; for (int x = startX, i = 0; x < (startX + 4); x++, i++) //it will go four steps { byte[] line = new byte[4]; for (int y = startY, j = 0; y < (startY + 4); y++, j++) { line[j] = original[x][y]; } points[i] = line; } }