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

  • Committer: edam
  • Date: 2012-02-25 01:31:17 UTC
  • Revision ID: tim@ed.am-20120225013117-53ed8yahoreoms76
updated software to include drawing abstraction infrastructure

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
class Drawer
 
3
{
 
4
public:
 
5
 
 
6
        /**
 
7
         * Draw an individual segment (column of pixels)
 
8
         *
 
9
         * @param segment the segment number
 
10
         */
 
11
        virtual void draw( int segment ) = 0;
 
12
 
 
13
        /**
 
14
         * Called before the first segment is drawn, once per "frame".
 
15
         */
 
16
        virtual void draw_reset();
 
17
 
 
18
protected:
 
19
 
 
20
        /**
 
21
         * Turn on/off an LED
 
22
         *
 
23
         * @param led index of the LED (0 to 9)
 
24
         * @param on true to turn on, false to turn off
 
25
         */
 
26
        void led_on( int led, bool on );
 
27
 
 
28
};