| 29 | } |
| 30 | |
| 31 | void Minimap::GetDimensions(float& width, float& height) |
| 32 | { |
| 33 | float windowWidth = ofGetWidth(); |
| 34 | float windowHeight = ofGetHeight(); |
| 35 | float ratio = windowWidth / windowHeight; |
| 36 | |
| 37 | if (ofGetWidth() > ofGetHeight()) |
| 38 | { |
| 39 | width = kMaxLength; |
| 40 | height = floor(kMaxLength / ratio) + kBookmarkSize; |
| 41 | } |
| 42 | else |
| 43 | { |
| 44 | height = kMaxLength; |
| 45 | width = floor(kMaxLength * ratio) + kBookmarkSize; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | void Minimap::GetDimensionsMinimap(float& width, float& height) |
| 50 | { |