KeyboardBitmap() public method

Returns a bitmap matching the keyboard's dimensions
public KeyboardBitmap ( ) : Bitmap
return System.Drawing.Bitmap
コード例 #1
0
ファイル: LoopManager.cs プロジェクト: SpoinkyNL/Artemis
        public RenderFrame(KeyboardProvider keyboard)
        {
            KeyboardBitmap = keyboard.KeyboardBitmap(4);
            KeyboardBitmap.SetResolution(96, 96);

            MouseBitmap = new Bitmap(40, 40);
            MouseBitmap.SetResolution(96, 96);

            HeadsetBitmap = new Bitmap(40, 40);
            HeadsetBitmap.SetResolution(96, 96);

            GenericBitmap = new Bitmap(40, 40);
            GenericBitmap.SetResolution(96, 96);

            MousematBitmap = new Bitmap(40, 40);
            MousematBitmap.SetResolution(96, 96);

            using (var g = Graphics.FromImage(KeyboardBitmap))
                g.Clear(Color.Black);
            using (var g = Graphics.FromImage(MouseBitmap))
                g.Clear(Color.Black);
            using (var g = Graphics.FromImage(HeadsetBitmap))
                g.Clear(Color.Black);
            using (var g = Graphics.FromImage(GenericBitmap))
                g.Clear(Color.Black);
            using (var g = Graphics.FromImage(MousematBitmap))
                g.Clear(Color.Black);
        }