示例#1
0
        public static void CopyPasteFieldTest(StructureParameters s)
        {
            int[] source_area = new int[100];
            int   start       = 33;
            int   end         = 459 + 126 * 10;

            for (int j = 0; j < 100; j++)
            {
                source_area[j] = start + j;
            }
            PasteFilter paste = new PasteFilter(s, start, source_area, end);

            paste.Apply();
            s.Generate().GenerateImage().Save("tests/StructureFilterTests/nachPaste.png");
            paste.Undo();
            s.Generate().GenerateImage().Save("tests/StructureFilterTests/nachPasteUndo.png");
        }
示例#2
0
        public static void CopyPasteFieldTest(FieldParameters fp)
        {
            int[] source_area = new int[400];
            int   startx      = 20;
            int   starty      = 20;
            int   target_x    = 30;
            int   target_y    = 30;

            for (int i = 0; i < 20; i++)
            {
                for (int j = 0; j < 20; j++)
                {
                    source_area[j * 20 + i] = fp.current_width * (j + starty) + (startx + i);
                }
            }
            PasteFilter paste = new PasteFilter(fp, fp.current_width * starty + startx, source_area, fp.current_width * target_y + target_x);

            paste.Apply();
            fp.Generate().GenerateImage().Save("tests/FilterTests/nachPaste.png");
            paste.Undo();
            fp.Generate().GenerateImage().Save("tests/FilterTests/nachPasteUndo.png");
        }