Mercurial > hg > tweakathon2ios
annotate xyView.h @ 52:89944ab3e129 tip
fix oF linker errors ios8
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Tue, 03 Feb 2015 13:18:23 +0000 |
parents | a223551fdc1f |
children |
rev | line source |
---|---|
rt300@0 | 1 // |
rt300@0 | 2 // xyView.h |
rt300@0 | 3 // soundspeed |
rt300@0 | 4 // |
rt300@0 | 5 // Created by Robert Tubb on 20/05/2013. |
rt300@0 | 6 // |
rt300@0 | 7 // |
rt300@0 | 8 |
rt300@0 | 9 #ifndef __soundspeed__xyView__ |
rt300@0 | 10 #define __soundspeed__xyView__ |
rt300@0 | 11 |
rt300@0 | 12 #include <iostream> |
rt300@0 | 13 #include "ofMain.h" |
rt300@0 | 14 |
rt300@0 | 15 // very sketchy XY |
rt300@0 | 16 |
rt300@0 | 17 class XYView{ |
rt300@0 | 18 private: |
rt300@0 | 19 float screenX, screenY, height, width; |
rt300@0 | 20 float ctrlX, ctrlY; |
rt300@0 | 21 |
rt300@0 | 22 bool isInMyArea(int x, int y); |
rt300@0 | 23 |
rt300@0 | 24 public: |
rt300@0 | 25 |
rt300@0 | 26 XYView(double x, double y, double w, double h){ |
rt300@0 | 27 screenX = x; |
rt300@0 | 28 screenY = y; |
rt300@0 | 29 width = w; |
rt300@0 | 30 height = h; |
rt300@0 | 31 ctrlX = w*0.5; |
rt300@0 | 32 ctrlY = h*0.5; |
rt300@0 | 33 } |
rt300@0 | 34 void draw(); |
rt300@0 | 35 bool handleTouch(double x, double y); // return false if ouside my area |
rt300@0 | 36 |
rt300@0 | 37 }; |
rt300@0 | 38 |
rt300@0 | 39 #endif /* defined(__soundspeed__xyView__) */ |