SetSize() public method

Sets the size.
public SetSize ( int width, int height ) : void
width int The width.
height int The height.
return void
Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VGAConsole"/> class.
        /// </summary>
        public VGAConsole(DisplayForm dislayForm)
        {
            ioBase = StandardIOBase;
            baseAddress = StandardAddressBase;

            width = 80;
            height = 27;

            cursorX = cursorY = 0;
            cursorPosition = 0;
            lastCommand = 0;

            font = new Font("Courier New", 9, FontStyle.Regular);
            fontWidth = (int)font.SizeInPoints;
            fontHeight = (int)font.SizeInPoints + 5;
            palette = Mosa.DeviceSystem.ColorPalette.CreateStandard16ColorPalette();

            this.dislayForm = dislayForm;
            dislayForm.SetSize(fontWidth * width + 12, fontHeight * height + 10);

            MemoryDispatch.RegisterMemory(baseAddress, StandardMemorySize, Read8, Write8);

            Initialize();
        }