From 291be502a0fe06ec53528a6e1e1d1ace82046ee7 Mon Sep 17 00:00:00 2001 From: James Crook Date: Sat, 6 May 2017 23:26:01 +0100 Subject: [PATCH] Generate JSON box list for ThemeCache The commented out wxLogDebug statements in Theme.cpp give the location of all the boxes in the theme. This is useful for identifying what is in the theme cache for javascript code. --- src/Theme.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Theme.cpp b/src/Theme.cpp index 40be42d5c..f575d3bd6 100644 --- a/src/Theme.cpp +++ b/src/Theme.cpp @@ -1042,7 +1042,8 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound) if( (mBitmapFlags[i] & resFlagInternal)==0) { mFlow.GetNextPosition( Image.GetWidth(),Image.GetHeight() ); - // wxLogDebug(wxT("Copy at %i %i (%i,%i)"), mxPos, myPos, xWidth1, yHeight1 ); + wxRect R = mFlow.RectInner(); + //wxLogDebug( "[%i, %i, %i, %i, \"%s\"], ", R.x, R.y, R.width, R.height, mBitmapNames[i].c_str() ); Image = GetSubImageWithAlpha( ImageCache, mFlow.RectInner() ); mBitmaps[i] = wxBitmap(Image); } @@ -1060,6 +1061,8 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound) { mFlow.GetNextPosition( iColSize, iColSize ); mFlow.RectMid( x, y ); + wxRect R = mFlow.RectInner(); + //wxLogDebug( "[%i, %i, %i, %i, \"%s\"], ", R.x, R.y, R.width, R.height, mColourNames[i].c_str() ); // Only change the colour if the alpha is opaque. // This allows us to add NEW colours more easily. if( ImageCache.GetAlpha(x,y ) > 128 )