Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int getCellSize() {
- int calcTemp;
- if (img.Width <= img.Height)
- calcTemp = (int) (img.Width / size);
- else
- calcTemp = (int) (img.Height / size);
- return calcTemp;
- }
- private void fillTable() {
- int currentWidth = 0;
- int currentHeight = 0;
- for (int i = 0; i < size; i++) {
- for (int j = 0; j < size; j++) {
- array [i] [j] = new Cell(Bitmap.CreateBitmap (img, currentWidth, currentHeight, cellSize, cellSize), i, j);
- currentWidth += cellSize;
- }
- currentWidth = 0;
- currentHeight += cellSize;
- }
- }
- private void fillTable() {
- int currentWidth = 0;
- int currentHeight = 0;
- for (int i = 0; i < size; i++) {
- for (int j = 0; j < size; j++) {
- array [i] [j] = new Cell(Bitmap.CreateBitmap (img, currentWidth, currentHeight, cellSize, cellSize), i, j);
- currentWidth += cellSize;
- }
- currentWidth = 0;
- currentHeight += cellSize;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement