示例#1
0
 public static void Dr(int X, int Y, int Xs, int Ys, int[] Array)
 {
     Cosmos.Hardware.VGAScreen VGA = new Cosmos.Hardware.VGAScreen();
     for (int x = 0; x < Xs; x++)
     {
         for (int y = 0; y < Ys; y++)
         {
             VGA.SetPixel((uint)(x + X), (uint)(y + Y), (uint)(Array[x * y]));
         }
     }
 }
示例#2
0
 public static void Dr(int X, int Y, int Xs, int Ys, int[] Array)
 {
     Cosmos.Hardware.VGAScreen VGA = new Cosmos.Hardware.VGAScreen();
     for(int x = 0; x < Xs; x++)
     {
         for (int y = 0; y < Ys; y++)
         {
             VGA.SetPixel((uint)(x + X), (uint)(y + Y), (uint)(Array[x * y]));
         }
     }
 }
示例#3
0
        /*
         * If I create a frame,  and set it to 16x32 the size will really be 16x32, but the way I coded this, you have
         * to invert it, so 16x32 would really be 32x16. It's the way the code works. So it's confusing just forget
         * I told you this, because you may accidently invert the actually size on the frame, and you dont want to do that.
         */
        public void RestoreFrame(uint xpos, uint ypos, Core.Graphics.Frame image)
        {
            //inverted.
            uint width  = (uint)image.Height;
            uint height = (uint)image.Width;

            if (width > height)
            {
                uint n = 0;
                for (uint x = 0; x < height; x++)
                {
                    for (uint y = 0; y < width; y++)
                    {
                        //Commented out this: xpos + x, ypos + y,
                        VGA.SetPixel320x200x8(xpos + x, ypos + y, image.GetPixel(n));
                        n += 1;
                    }
                }
            }
            if (width == height)
            {
                uint n = 0;
                for (uint x = 0; x < height; x++)
                {
                    for (uint y = 0; y < width; y++)
                    {
                        //Commented out this: xpos + x, ypos + y,
                        VGA.SetPixel320x200x8(xpos + x, ypos + y, image.GetPixel(n));
                        n += 1;
                    }
                }
            }
            if (width < height)
            {
                uint n = 0;
                for (uint y = 0; y < width; y++)
                {
                    for (uint x = 0; x < height; x++)
                    {
                        //Commented out this: xpos + x, ypos + y,
                        VGA.SetPixel(xpos + x, ypos + y, image.GetPixel(n));
                        n += 1;
                    }
                }
            }
        }
示例#4
0
 public static void Plot(int x, int y, int c)
 {
     Vga.SetPixel((uint)x, (uint)y, (uint)c);
 }