Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of el17ajf by
Diff: Graphics/Graphics.cpp
- Revision:
- 18:24ce897024d0
- Parent:
- 17:cc448ab7266f
- Child:
- 19:370d83a8dc33
--- a/Graphics/Graphics.cpp Wed Apr 03 13:37:56 2019 +0000 +++ b/Graphics/Graphics.cpp Wed Apr 03 14:31:49 2019 +0000 @@ -85,13 +85,11 @@ } int getBorderSizeX(int blockSize) { - int xBlocks = SCREEN_WIDTH / blockSize; - return (SCREEN_WIDTH - xBlocks * blockSize) / 2; + return (SCREEN_WIDTH - Grid::GRID_WIDTH * blockSize) / 2; } int getBorderSizeY(int blockSize) { - int yBlocks = SCREEN_HEIGHT / blockSize; - return (SCREEN_HEIGHT - yBlocks*blockSize) / 2; + return (SCREEN_HEIGHT - Grid::GRID_HEIGHT * blockSize) / 2; } int BLOCK_SIZE = getBlockSize();