public void Run() { var screenBitmap = new Bitmap(_screen.Screen, 800, 600, 800*4); var desktop = new BitmapRenderer(screenBitmap); var screen = new BitmapRenderer(screenBitmap); var root = new Element(); root.Add(new Box(screenBitmap.Area, 0xff404040)); while (_power.On) { screen.Draw(Cursor, new Point(_mouse.X, _mouse.Y)); //_screen.Screen[_mouse.X + _mouse.Y * 320] = 255; _screen.VRetrace(); root.Render(desktop); foreach (Elements.App app in _apps) { foreach (Window window in app.Windows) { window.Render(desktop); } } } }
public override void Render(BitmapRenderer target) { target.Draw(_rectangle, _color); }