view xyView.h @ 44:d810aa9ca03a

times. cosmetic stuff
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Mon, 15 Dec 2014 17:33:41 +0000
parents a223551fdc1f
children
line wrap: on
line source
//
//  xyView.h
//  soundspeed
//
//  Created by Robert Tubb on 20/05/2013.
//
//

#ifndef __soundspeed__xyView__
#define __soundspeed__xyView__

#include <iostream>
#include "ofMain.h"

// very sketchy XY

class XYView{
private:
    float screenX, screenY, height, width;
    float ctrlX, ctrlY;
    
    bool isInMyArea(int x, int y);
    
public:
    
    XYView(double x, double y, double w, double h){
        screenX = x;
        screenY = y;
        width = w;
        height = h;
        ctrlX = w*0.5;
        ctrlY = h*0.5;
    }
    void draw();
    bool handleTouch(double x, double y); // return false if ouside my area
    
};

#endif /* defined(__soundspeed__xyView__) */