#include <psychlops.h>
using namespace Psychlops;

double d1,d2,d3,d4,d5,d6,d7,d8,x,y;
Psychlops::Point point1;
Psychlops::Rectangle rect1;

void psychlops_main() {

	Canvas sampleA(Canvas::fullscreen);
	rect1.set(100,100);
	rect1.centering();
	sampleA.rect(rect1,Color::cyan);

	point1=rect1.getCenter();
	d1=rect1.getHcenter();
	d2=rect1.getVcenter();
	d3=rect1.getHeight();
	d4=rect1.getWidth();
	d5=rect1.getTop();
	d6=rect1.getLeft();
	d7=rect1.getBottom();
	d8=rect1.getRight();
	
	//get命令の内容を画面表示する
	x=point1.getX();
	y=point1.getY();
	sampleA.msg("getCenter_x:",50,200);
	sampleA.var(x,200,200);//getCenter:X
	sampleA.msg("getCenter_y:",50,250);
	sampleA.var(y,200,250);//getCenter:Y		
	sampleA.msg("getHcenter:",50,300);
	sampleA.var(d1,200,300);//getHcenter
	sampleA.msg("getVcenter:",50,350);
	sampleA.var(d2,200,350);//getVcenter
	sampleA.msg("gettHeight:",50,400);
	sampleA.var(d3,200,400);//getHeight
	sampleA.msg("getWidth:",50,450);
	sampleA.var(d4,200,450);//getWidth

	sampleA.msg("getTop:",250,200);
	sampleA.var(d5,400,200);//getTop
	sampleA.msg("getLeft:",250,250);
	sampleA.var(d6,400,250);//getLeft
	sampleA.msg("getBottom:",250,300);
	sampleA.var(d7,400,300);//getBottom
	sampleA.msg("getRight:",250,350);
	sampleA.var(d8,400,350);//getRight
		
	sampleA.flip();
	while(!Input::get(Keyboard::spc));
}