comparison xyView.h @ 0:a223551fdc1f

First commit - copy from tweakathlon.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Fri, 10 Oct 2014 11:46:42 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a223551fdc1f
1 //
2 // xyView.h
3 // soundspeed
4 //
5 // Created by Robert Tubb on 20/05/2013.
6 //
7 //
8
9 #ifndef __soundspeed__xyView__
10 #define __soundspeed__xyView__
11
12 #include <iostream>
13 #include "ofMain.h"
14
15 // very sketchy XY
16
17 class XYView{
18 private:
19 float screenX, screenY, height, width;
20 float ctrlX, ctrlY;
21
22 bool isInMyArea(int x, int y);
23
24 public:
25
26 XYView(double x, double y, double w, double h){
27 screenX = x;
28 screenY = y;
29 width = w;
30 height = h;
31 ctrlX = w*0.5;
32 ctrlY = h*0.5;
33 }
34 void draw();
35 bool handleTouch(double x, double y); // return false if ouside my area
36
37 };
38
39 #endif /* defined(__soundspeed__xyView__) */