1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
/*
PsychRects.h
PLATFORMS:
Only OS X for now.
AUTHORS:
Allen Ingling awi Allen.Ingling@nyu.edu
HISTORY:
02/11/03 awi wrote it.
DESCRIPTION:
*/
//begin include once
#ifndef PSYCH_IS_INCLUDED_PsychRects
#define PSYCH_IS_INCLUDED_PsychRects
//includes
#include "Screen.h"
#define kPsychLeft 0
#define kPsychTop 1
#define kPsychRight 2
#define kPsychBottom 3
typedef double PsychRectType[4];
//Accessors for PsychRectType
void PsychMakeRect(double *psychRect, double left, double top, double right, double bottom);
psych_bool IsPsychRectEmpty(PsychRectType rect);
psych_bool ValidatePsychRect(PsychRectType rect);
double PsychGetWidthFromRect(const double *rect);
double PsychGetHeightFromRect(const double *rect);
void PsychCenterRect(const double *innerRect, const double *outerRect, double *newRect);
void PsychCenterRectInRect(const double *innerRect, const double *outerRect, double *newRect);
void PsychCopyRect(double *toRect, const double *fromRect);
void PsychGetCenterFromRectAbsolute(const double *rect, double *rectCenterX, double *rectCenterY);
void PsychGetManhattanDistance(double x1, double y1, double x2, double y2, double *deltaX, double *deltaY);
void PsychNormalizeRect(double *rect, double *normRect);
void PsychInvertRectY(double *rectB, double *rectA, double *frameA);
psych_bool PsychMatchRect(double *rectA, double *RectB);
void PsychFindEnclosingTextureRect(double *rectA, double *enclosingRect);
//end include once
#endif
|