/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.h

  • Committer: Tim Marston
  • Date: 2012-05-17 22:49:11 UTC
  • Revision ID: tim@ed.am-20120517224911-dbd9dtcpl14xlhi0
rewrote/fixed button event triggering code

Show diffs side-by-side

added added

removed removed

34
34
{
35
35
 
36
36
        /**
 
37
         * Initialise.
 
38
         */
 
39
        void init();
 
40
 
 
41
        /**
37
42
         * Get the width, in pexels, of a message.
38
43
         *
39
44
         * @param message_len the length of the message
 
45
         * @param scale taxt scaling factor
40
46
         */
41
 
        int get_width( int message_len );
 
47
        int get_width( int message_len, int scale );
42
48
 
43
49
        /**
44
50
         * Draw a column of pixels at pixel-offset x in the message.
45
51
         *
46
52
         * @param message the message
47
 
         * @param message_len the length of the message (to save it being calculated)
 
53
         * @param message_len the length of the message (to save it being
 
54
         *              calculated)
48
55
         * @param x the pixel column of the message to draw
49
56
         * @param y_flip true to draw up-side down
50
57
         * @param y_shift shift the drawing up/down
 
58
         * @param scale taxt scaling factor
51
59
         */
52
60
        void render( const char *message, int message_len, int x,
53
 
                                 bool y_flip, int y_shift );
 
61
                                 bool y_flip, int y_shift, int scale );
54
62
 
55
63
        /**
56
64
         * Reset the output buffer.
57
65
         */
58
66
        void reset_buffer();
59
67
 
 
68
 
 
69
        /**
 
70
         * Notify renderer that the output buffer will require rendering.
 
71
         */
 
72
        void buffer_in_use();
 
73
 
 
74
 
60
75
        /**
61
76
         * Output the output buffer (and reset the output buffer).
62
77
         */
63
78
        void output_buffer();
64
79
 
65
80
        /**
66
 
         * Set the font number to use
 
81
         * Get the font number in use.
67
82
         *
68
 
         * @param font_num font number
69
 
         */
70
 
        void select_font( int font_num );
 
83
         * @return font number
 
84
         */
 
85
        int get_font();
 
86
 
 
87
        /**
 
88
         * Switch to the next font.
 
89
         */
 
90
        void inc_font();
71
91
 
72
92
};
73
93