mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
fix to compile post-merge
This commit is contained in:
parent
d7a1f53157
commit
9cd7dd6c98
1 changed files with 24 additions and 0 deletions
|
@ -415,6 +415,30 @@ public class BoardView extends View implements BoardHandler, SyncedDraw {
|
||||||
return m_pendingScore;
|
return m_pendingScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Bitmap getScaledBoard()
|
||||||
|
{
|
||||||
|
Bitmap result = null;
|
||||||
|
if ( GitVersion.THUMBNAIL_SUPPORTED ) {
|
||||||
|
int divisor = XWPrefs.getThumbScale( m_context );
|
||||||
|
|
||||||
|
if ( 0 < divisor ) {
|
||||||
|
int[] dims = new int[2];
|
||||||
|
Rect rect = new Rect();
|
||||||
|
XwJNI.board_getActiveRect( m_jniGamePtr, rect, dims );
|
||||||
|
|
||||||
|
Bitmap tmpb =
|
||||||
|
Bitmap.createBitmap( s_bitmap, rect.left, rect.top,
|
||||||
|
1 + rect.width(), 1 + rect.height() );
|
||||||
|
|
||||||
|
result = Bitmap.createScaledBitmap( tmpb,
|
||||||
|
rect.width() / divisor,
|
||||||
|
rect.height() / divisor,
|
||||||
|
false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private int getSpacing( MotionEvent event )
|
private int getSpacing( MotionEvent event )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
Loading…
Add table
Reference in a new issue