Last active
August 28, 2017 12:41
-
-
Save Mailaender/da2a3f04e971aea57fd30ad492abcc92 to your computer and use it in GitHub Desktop.
DetermineBounds vs. DetermineScreenMapBounds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rectangle DetermineScreenMapBounds() | |
{ | |
var size = TraitsImplementing<IScreenMapSize>().Select(x => x.ScreenMapSize(this)).FirstOrDefault(); | |
var offset = -size / 2; | |
return new Rectangle(offset.X, offset.Y, size.X, size.Y); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment