mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
cleanup
This commit is contained in:
parent
ada635d9b6
commit
3911ed4ebc
1 changed files with 4 additions and 25 deletions
|
@ -315,7 +315,6 @@ sym_draw_score_drawPlayer( DrawCtx* p_dctx,
|
||||||
|
|
||||||
SymDrawCtxt* sctx = (SymDrawCtxt*)p_dctx;
|
SymDrawCtxt* sctx = (SymDrawCtxt*)p_dctx;
|
||||||
CONST_60 CFont* font = sctx->iScoreFont;
|
CONST_60 CFont* font = sctx->iScoreFont;
|
||||||
sctx->iGC->UseFont( font );
|
|
||||||
|
|
||||||
TRect lRect;
|
TRect lRect;
|
||||||
symLocalRect( &lRect, rOuter );
|
symLocalRect( &lRect, rOuter );
|
||||||
|
@ -344,6 +343,8 @@ sym_draw_score_drawPlayer( DrawCtx* p_dctx,
|
||||||
sctx->iGC->SetBrushStyle( CGraphicsContext::ENullBrush );
|
sctx->iGC->SetBrushStyle( CGraphicsContext::ENullBrush );
|
||||||
|
|
||||||
TBuf16<64> tbuf;
|
TBuf16<64> tbuf;
|
||||||
|
sctx->iGC->UseFont( font );
|
||||||
|
|
||||||
/* Draw name */
|
/* Draw name */
|
||||||
lRect.iTl.iX = lRect.iBr.iX + 1; /* add one to get name away from edge */
|
lRect.iTl.iX = lRect.iBr.iX + 1; /* add one to get name away from edge */
|
||||||
lRect.iBr.iX += KNameColumnWidth;
|
lRect.iBr.iX += KNameColumnWidth;
|
||||||
|
@ -354,8 +355,7 @@ sym_draw_score_drawPlayer( DrawCtx* p_dctx,
|
||||||
lRect.iTl.iX = lRect.iBr.iX;
|
lRect.iTl.iX = lRect.iBr.iX;
|
||||||
lRect.iBr.iX += KScoreColumnWidth;
|
lRect.iBr.iX += KScoreColumnWidth;
|
||||||
tbuf.Num( dsi->score );
|
tbuf.Num( dsi->score );
|
||||||
sctx->iGC->DrawText( tbuf, lRect, baseline,
|
sctx->iGC->DrawText( tbuf, lRect, baseline, CGraphicsContext::ERight );
|
||||||
CGraphicsContext::ERight );
|
|
||||||
|
|
||||||
/* Draw last move */
|
/* Draw last move */
|
||||||
lRect.iTl.iX = lRect.iBr.iX + 6; /* 6 gives it some spacing from
|
lRect.iTl.iX = lRect.iBr.iX + 6; /* 6 gives it some spacing from
|
||||||
|
@ -671,6 +671,7 @@ sym_draw_eraseMiniWindow( DrawCtx* /*p_dctx*/, XP_Rect* /*rect*/,
|
||||||
static void
|
static void
|
||||||
figureFonts( SymDrawCtxt* sctx )
|
figureFonts( SymDrawCtxt* sctx )
|
||||||
{
|
{
|
||||||
|
/* Look at FontUtils class for info on fonts. */
|
||||||
#if defined SERIES_80
|
#if defined SERIES_80
|
||||||
XP_LOGF( "figureFonts" );
|
XP_LOGF( "figureFonts" );
|
||||||
TBuf<128> fontName;
|
TBuf<128> fontName;
|
||||||
|
@ -684,17 +685,6 @@ figureFonts( SymDrawCtxt* sctx )
|
||||||
|
|
||||||
for ( TInt i = 0; i < nTypes; ++i ) {
|
for ( TInt i = 0; i < nTypes; ++i ) {
|
||||||
sdev->TypefaceSupport( tfSupport, i );
|
sdev->TypefaceSupport( tfSupport, i );
|
||||||
#if 0
|
|
||||||
fontName = tfSupport.iTypeface.iName.Des();
|
|
||||||
TBuf8<128> tmpb;
|
|
||||||
tmpb.Copy( fontName );
|
|
||||||
XP_UCHAR buf[128];
|
|
||||||
XP_MEMCPY( buf, (void*)(tmpb.Ptr()), tmpb.Length() );
|
|
||||||
buf[tmpb.Length()] = '\0';
|
|
||||||
XP_LOGF( "got font %s: %d - %d, scalable: %s", buf,
|
|
||||||
tfSupport.iMinHeightInTwips, tfSupport.iMaxHeightInTwips,
|
|
||||||
(tfSupport.iIsScalable?"yes":"no") );
|
|
||||||
#endif
|
|
||||||
if ( tfSupport.iMinHeightInTwips < smallSize ) {
|
if ( tfSupport.iMinHeightInTwips < smallSize ) {
|
||||||
smallIndex = i;
|
smallIndex = i;
|
||||||
smallSize = tfSupport.iMinHeightInTwips;
|
smallSize = tfSupport.iMinHeightInTwips;
|
||||||
|
@ -707,15 +697,6 @@ figureFonts( SymDrawCtxt* sctx )
|
||||||
sdev->TypefaceSupport( tfSupport, smallIndex );
|
sdev->TypefaceSupport( tfSupport, smallIndex );
|
||||||
fontName = tfSupport.iTypeface.iName.Des();
|
fontName = tfSupport.iTypeface.iName.Des();
|
||||||
|
|
||||||
#if 0
|
|
||||||
TBuf8<128> tmpb;
|
|
||||||
tmpb.Copy( fontName );
|
|
||||||
XP_UCHAR buf[128];
|
|
||||||
XP_MEMCPY( buf, (void*)(tmpb.Ptr()), tmpb.Length() );
|
|
||||||
buf[tmpb.Length()] = '\0';
|
|
||||||
XP_LOGF( "using font %s: %d ", buf,
|
|
||||||
tfSupport.iMinHeightInTwips );
|
|
||||||
#endif
|
|
||||||
TFontSpec fontSpecBoard( fontName, (scaleBoardV) * twipAdjust );
|
TFontSpec fontSpecBoard( fontName, (scaleBoardV) * twipAdjust );
|
||||||
sdev->GetNearestFontInTwips( sctx->iBoardFont, fontSpecBoard );
|
sdev->GetNearestFontInTwips( sctx->iBoardFont, fontSpecBoard );
|
||||||
|
|
||||||
|
@ -726,7 +707,6 @@ figureFonts( SymDrawCtxt* sctx )
|
||||||
TFontSpec fontSpecVal( fontName, (tileHt / 3) * twipAdjust );
|
TFontSpec fontSpecVal( fontName, (tileHt / 3) * twipAdjust );
|
||||||
sdev->GetNearestFontInTwips( sctx->iTileValueFont, fontSpecVal );
|
sdev->GetNearestFontInTwips( sctx->iTileValueFont, fontSpecVal );
|
||||||
|
|
||||||
|
|
||||||
TFontSpec fontSpecScore( fontName, scaleBoardV * twipAdjust );
|
TFontSpec fontSpecScore( fontName, scaleBoardV * twipAdjust );
|
||||||
sdev->GetNearestFontInTwips( sctx->iScoreFont, fontSpecScore );
|
sdev->GetNearestFontInTwips( sctx->iScoreFont, fontSpecScore );
|
||||||
|
|
||||||
|
@ -748,7 +728,6 @@ figureFonts( SymDrawCtxt* sctx )
|
||||||
XP_LOGF( "figureFonts done" );
|
XP_LOGF( "figureFonts done" );
|
||||||
} // figureFonts
|
} // figureFonts
|
||||||
|
|
||||||
|
|
||||||
DrawCtx*
|
DrawCtx*
|
||||||
sym_drawctxt_make( MPFORMAL CWindowGc* aGC, CCoeEnv* aCoeEnv,
|
sym_drawctxt_make( MPFORMAL CWindowGc* aGC, CCoeEnv* aCoeEnv,
|
||||||
CEikonEnv* aEikonEnv )
|
CEikonEnv* aEikonEnv )
|
||||||
|
|
Loading…
Reference in a new issue