diff options
author | Jan Holesovsky <kendy@collabora.com> | 2018-10-24 21:41:02 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-11-07 12:50:52 +0100 |
commit | ddd2790f3402abaa64ccc501b63826dd29b29b68 (patch) | |
tree | 884dc5aab70014ff90aeacfb2168b4def67c3501 /desktop | |
parent | 4f605d49ba5a436730ceddaf739544b99c0812fe (diff) |
Revert "The debugging rectangles are not needed any more."
Still useful for debugging, particularly in combination with
gtktiledviewer.
This reverts commit dec025d4cb51f252ecd7e981fe36800cf2bedff5.
Change-Id: Id2174486c0427adf083be199ce2dbb453beb8f22
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 376caead288d..7527c1b857d2 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2129,6 +2129,19 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); + + static bool bDebug = getenv("LOK_DEBUG_TILES") != nullptr; + if (bDebug) + { + // Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins. + tools::Rectangle aRect(0, 0, 5, 5); + aRect = pDevice->PixelToLogic(aRect); + pDevice->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); + pDevice->SetFillColor(COL_LIGHTRED); + pDevice->SetLineColor(); + pDevice->DrawRect(aRect); + pDevice->Pop(); + } #endif #else |