diff --git a/OpenRa.Game/Region.cs b/OpenRa.Game/Region.cs index 7b3514cad7..06a6893262 100644 --- a/OpenRa.Game/Region.cs +++ b/OpenRa.Game/Region.cs @@ -7,11 +7,11 @@ namespace OpenRa.Game { class Region { - PointF location; + Point location; Size size; Renderable drawFunction; - public Region(PointF location, Size size, Renderable drawFunction) + public Region(Point location, Size size, Renderable drawFunction) { this.location = location; this.size = size; @@ -20,7 +20,7 @@ namespace OpenRa.Game public void Draw(Renderer renderer, Viewport viewport) { - renderer.Device.EnableScissor((int)location.X, (int)location.Y, size.Width, size.Height); + renderer.Device.EnableScissor(location.X, location.Y, size.Width, size.Height); drawFunction(renderer, viewport); renderer.Device.DisableScissor(); } diff --git a/OpenRa.Game/Viewport.cs b/OpenRa.Game/Viewport.cs index 32f33478d6..85358da855 100644 --- a/OpenRa.Game/Viewport.cs +++ b/OpenRa.Game/Viewport.cs @@ -36,16 +36,16 @@ namespace OpenRa.Game switch (anchor) { case AnchorStyles.Top: - regions.Add(new Region(new PointF(0, 0), new Size(clientSize.Width, distanceFromAnchor), drawFunction)); + regions.Add(new Region(new Point(0, 0), new Size(clientSize.Width, distanceFromAnchor), drawFunction)); break; case AnchorStyles.Bottom: - regions.Add(new Region(new PointF(0, clientSize.Height - distanceFromAnchor), new Size(clientSize.Width, distanceFromAnchor), drawFunction)); + regions.Add(new Region(new Point(0, clientSize.Height - distanceFromAnchor), new Size(clientSize.Width, distanceFromAnchor), drawFunction)); break; case AnchorStyles.Left: - regions.Add(new Region(new PointF(0, 0), new Size(distanceFromAnchor, clientSize.Height), drawFunction)); + regions.Add(new Region(new Point(0, 0), new Size(distanceFromAnchor, clientSize.Height), drawFunction)); break; case AnchorStyles.Right: - regions.Add(new Region(new PointF(clientSize.Width - distanceFromAnchor, 0), new Size(distanceFromAnchor, clientSize.Height), drawFunction)); + regions.Add(new Region(new Point(clientSize.Width - distanceFromAnchor, 0), new Size(distanceFromAnchor, clientSize.Height), drawFunction)); break; case AnchorStyles.None: throw new NotImplementedException();