/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/text_renderer.cc

  • Committer: edam
  • Date: 2012-03-23 15:56:07 UTC
  • Revision ID: tim@ed.am-20120323155607-6h8pc0c6o35nl179
switch button to no interim presses during settings mode; added NVRAM support

Show diffs side-by-side

added added

removed removed

Lines of Context:
358
358
}
359
359
 
360
360
 
361
 
int TextRenderer::get_width( int message_len, int scale )
 
361
int TextRenderer::get_width( int message_len )
362
362
{
363
 
        return message_len * 8 * scale;
 
363
        return message_len * 8 * TEXT_SCALE;
364
364
}
365
365
 
366
366
 
367
367
void TextRenderer::render( const char *message, int message_len, int x,
368
 
                                                   bool y_flip, int y_shift, int scale )
 
368
                                                   bool y_flip, int y_shift )
369
369
{
370
370
        char glyph_col = 0;
371
371
 
373
373
        if( x >= 0 )
374
374
        {
375
375
                // scale font
376
 
                x /= scale;
 
376
                x /= TEXT_SCALE;
377
377
 
378
378
                int pos = x / 8;
379
379
                if( pos < message_len )