fixes flicker

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1083 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2007-06-27 01:36:23 +00:00
parent 284072765b
commit 8296c7c9bc

View File

@@ -16,6 +16,8 @@ namespace ShpViewer
public MapViewControl()
{
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
UpdateStyles();
}
static Font font = new Font( FontFamily.GenericMonospace, 10 );
@@ -24,8 +26,9 @@ namespace ShpViewer
base.OnPaint(e);
if (Map == null || TileSet == null)
return;
using( Graphics g = e.Graphics )
{
Graphics g = e.Graphics;
for (int x = 50; x >= 0; x--)
{
int tX = x + Map.XOffset + XScroll;
@@ -62,4 +65,3 @@ namespace ShpViewer
}
}
}
}