private Graphics GetGraphics() { var g = _GUISurface?.GetGraphics() ?? Graphics.FromImage(_nullGraphicsBitmap); var(tx, ty) = Emulator.ScreenLogicalOffsets(); if (tx != 0 || ty != 0) { var transform = g.Transform; transform.Translate(-tx, -ty); g.Transform = transform; } return(g); }
private Graphics GetGraphics() { var g = _GUISurface?.GetGraphics() ?? Graphics.FromImage(_nullGraphicsBitmap); // we don't like CoreComm, right? Someone should find a different way to do this then. var tx = Emulator.CoreComm.ScreenLogicalOffsetX; var ty = Emulator.CoreComm.ScreenLogicalOffsetY; if (tx != 0 || ty != 0) { var transform = g.Transform; transform.Translate(-tx, -ty); g.Transform = transform; } return(g); }
private Graphics GetGraphics() { var g = _luaSurface == null?Graphics.FromImage(_nullGraphicsBitmap) : _luaSurface.GetGraphics(); var tx = Global.Emulator.CoreComm.ScreenLogicalOffsetX; var ty = Global.Emulator.CoreComm.ScreenLogicalOffsetY; if (tx != 0 || ty != 0) { var transform = g.Transform; transform.Translate(-tx, -ty); g.Transform = transform; } return(g); }