File: PsychRects.h

package info (click to toggle)
psychtoolbox-3 3.0.14.20170103%2Bgit6-g605ff5c.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 103,044 kB
  • ctags: 69,483
  • sloc: ansic: 167,371; cpp: 11,232; objc: 4,708; sh: 1,875; python: 383; php: 344; makefile: 207; java: 113
file content (60 lines) | stat: -rw-r--r-- 1,565 bytes parent folder | download | duplicates (3)
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