/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: edam
  • Date: 2012-02-29 21:56:32 UTC
  • Revision ID: edam@waxworlds.org-20120229215632-kypb9491vx7bicef
moved some stuf round, created a re-usable pool of message buffers, genericised "modes" for messages

Show diffs side-by-side

added added

removed removed

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