Dependencies:   Rectangle

main.cpp

Committer:
projetremote
Date:
2011-05-03
Revision:
0:a8b629c2c441

File content as of revision 0:a8b629c2c441:

/*#include "mbed.h"
#include "Objet.h"

Objet :: Objet(int x ,int y, int width , int height){
     Origin['x'] = x;
     Origin['y'] = y;
     End['x'] = x + width;
     End['y'] = y + height;
    }

Objet :: is_touch(int x_touch , int y_touch){
    if(x_touch >= Origin['x'] && x_touch <= End['x']) // Si dans l'objet en x
        if(y_touch >= Origin['y'] && y_touch <= End['y']) // Et si dans l'objet en y
            return true;
    return false;
    }
    
Objet :: depladement(int new_x,int new_y){
    int width = End['x'] - Origin['x'];
    int height = End['y'] - Origin['y'];
    Origin['x'] = new_x;
    Origin['y'] = new_y;
    End['x'] = new_x + width;
    End['y'] = new_y + height;
    }
    
Objet :: changement(int new_width, int new_height){
    End['x'] = Origin['x'} + new_width;
    End['y'] = Origin'y'] + new_height;
    }
    
*/