aboutsummaryrefslogtreecommitdiffhomepage
path: root/xcode/FileReaderApp/ReaderView.h
blob: b8e6e572f8b9ca4633c0927677d0a60fe9700b37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "SkView.h"
#include "SkColor.h"
#include "SkBitmap.h"

/*
 * Pipe Reader with File IO. This view reads from the data file produced by the 
 * Pipe Writer. 
 */

//Make sure to change this to a valid path that matches FILE_PATH in sampleapp
#define FILE_PATH "/path/to/drawing.data"

class ReaderView : public SkView {
public:
    ReaderView();
    virtual void draw(SkCanvas* canvas);
    
private:
    int     fFilePos;
    int     fFront;
    int     fBack;
    SkColor fBGColor;
    SkBitmap fBufferBitmaps[2];
    typedef SkView INHERITED;
};