HexView - cleanup and comment out GDIREnderer for now
This commit is contained in:
parent
92d6769b06
commit
ca2767c536
|
@ -12,7 +12,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public class HexView : Control
|
public class HexView : Control
|
||||||
{
|
{
|
||||||
private readonly GdiRenderer Gdi;
|
//private readonly IControlRenderer _renderer;
|
||||||
private readonly Font NormalFont;
|
private readonly Font NormalFont;
|
||||||
private Size _charSize;
|
private Size _charSize;
|
||||||
|
|
||||||
|
@ -27,18 +27,18 @@ namespace BizHawk.Client.EmuHawk
|
||||||
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
SetStyle(ControlStyles.Opaque, true);
|
SetStyle(ControlStyles.Opaque, true);
|
||||||
|
|
||||||
Gdi = new GdiRenderer();
|
//_renderer = new GdiRenderer();
|
||||||
|
|
||||||
using (var g = CreateGraphics())
|
//using (var g = CreateGraphics())
|
||||||
using (var LCK = Gdi.LockGraphics(g))
|
//using (var LCK = _renderer.LockGraphics(g))
|
||||||
{
|
//{
|
||||||
_charSize = Gdi.MeasureString("A", NormalFont); // TODO make this a property so changing it updates other values.
|
// _charSize = _renderer.MeasureString("A", NormalFont); // TODO make this a property so changing it updates other values.
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
Gdi.Dispose();
|
//_renderer.Dispose();
|
||||||
|
|
||||||
NormalFont.Dispose();
|
NormalFont.Dispose();
|
||||||
|
|
||||||
|
@ -49,21 +49,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs e)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
using (var LCK = Gdi.LockGraphics(e.Graphics))
|
//using (var lck = _renderer.LockGraphics(e.Graphics))
|
||||||
{
|
//{
|
||||||
Gdi.StartOffScreenBitmap(Width, Height);
|
// _renderer.StartOffScreenBitmap(Width, Height);
|
||||||
|
|
||||||
// White Background
|
// // White Background
|
||||||
Gdi.SetBrush(Color.White);
|
// _renderer.SetBrush(Color.White);
|
||||||
Gdi.SetSolidPen(Color.White);
|
// _renderer.SetSolidPen(Color.White);
|
||||||
Gdi.FillRectangle(0, 0, Width, Height);
|
// _renderer.FillRectangle(0, 0, Width, Height);
|
||||||
|
|
||||||
|
|
||||||
Gdi.DrawString("Hello World", new Point(10, 10));
|
// _renderer.DrawString("Hello World", new Point(10, 10));
|
||||||
|
|
||||||
Gdi.CopyToScreen();
|
// _renderer.CopyToScreen();
|
||||||
Gdi.EndOffScreenBitmap();
|
// _renderer.EndOffScreenBitmap();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in New Issue