Oyranos Colour Management System API
Data Structures | Typedefs | Functions
Rectangle Handling
Miscellaneous
Collaboration diagram for Rectangle Handling:

Data Structures

struct  oyRectangle_s
 start with a simple rectangle More...

Typedefs

typedef struct oyRectangle_s oyRectangle_s
 start with a simple rectangle

Functions

oyRectangle_soyRectangle_s::oyRectangle_NewWith (double x, double y, double width, double height, oyObject_s object)
 new with geometry
oyRectangle_soyRectangle_s::oyRectangle_NewFrom (oyRectangle_s *ref, oyObject_s object)
 new from other rectangle
int oyRectangle_s::oyRectangle_SamplesFromImage (oyImage_s *image, oyRectangle_s *image_rectangle, oyRectangle_s *pixel_rectangle)
 new from image
oyRectangle_soyRectangle_s::oyRectangle_Copy (oyRectangle_s *orig, oyObject_s object)
 copy/reference from other rectangle
int oyRectangle_s::oyRectangle_Release (oyRectangle_s **obj)
 release
void oyRectangle_s::oyRectangle_SetGeo (oyRectangle_s *edit_rectangle, double x, double y, double width, double height)
 set geometry
void oyRectangle_s::oyRectangle_SetByRectangle (oyRectangle_s *edit_rectangle, oyRectangle_s *ref)
 copy values
void oyRectangle_s::oyRectangle_Trim (oyRectangle_s *edit_rectangle, oyRectangle_s *ref)
 trim edit_rectangle to ref extents
void oyRectangle_s::oyRectangle_MoveInside (oyRectangle_s *edit_rectangle, oyRectangle_s *ref)
 trim edit_rectangle to ref extents
void oyRectangle_s::oyRectangle_Scale (oyRectangle_s *edit_rectangle, double factor)
 scale with origin in the top left corner
void oyRectangle_s::oyRectangle_Normalise (oyRectangle_s *edit_rectangle)
 normalise swapped values for width and height
void oyRectangle_s::oyRectangle_Round (oyRectangle_s *edit_rectangle)
 scale with origin in the top left corner
int oyRectangle_s::oyRectangle_IsEqual (oyRectangle_s *rectangle1, oyRectangle_s *rectangle2)
 compare
int oyRectangle_s::oyRectangle_IsInside (oyRectangle_s *test, oyRectangle_s *ref)
 compare
int oyRectangle_s::oyRectangle_PointIsInside (oyRectangle_s *rectangle, double x, double y)
 compare
double oyRectangle_s::oyRectangle_CountPoints (oyRectangle_s *rectangle)
 count number of points covered by this rectangle
int oyRectangle_s::oyRectangle_Index (oyRectangle_s *rectangle, double x, double y)
 return position inside rectangle, assuming rectangle size
const char * oyRectangle_s::oyRectangle_Show (oyRectangle_s *r)
 debug text not so threadsafe

Typedef Documentation

typedef struct oyRectangle_s oyRectangle_s

start with a simple rectangle


Function Documentation

oyRectangle_s * oyRectangle_Copy ( oyRectangle_s orig,
oyObject_s  object 
)

copy/reference from other rectangle

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

References oyRectangle_s::oyRectangle_NewFrom().

double oyRectangle_CountPoints ( oyRectangle_s rectangle)

count number of points covered by this rectangle

Version:
Oyranos: 0.1.10
Since:
2007/12/04 (Oyranos: 0.1.8)
Date:
2009/02/23
int oyRectangle_Index ( oyRectangle_s rectangle,
double  x,
double  y 
)

return position inside rectangle, assuming rectangle size

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)
int oyRectangle_IsEqual ( oyRectangle_s rectangle1,
oyRectangle_s rectangle2 
)

compare

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)
int oyRectangle_IsInside ( oyRectangle_s test,
oyRectangle_s ref 
)

compare

Version:
Oyranos: 0.1.10
Since:
2009/02/23 (Oyranos: 0.1.10)
Date:
2009/02/23

References oyRectangle_s::oyRectangle_PointIsInside().

void oyRectangle_MoveInside ( oyRectangle_s edit_rectangle,
oyRectangle_s ref 
)

trim edit_rectangle to ref extents

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

References oyRectangle_s::oyRectangle_Normalise().

oyRectangle_s * oyRectangle_NewFrom ( oyRectangle_s ref,
oyObject_s  object 
)

new from other rectangle

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

References oyRectangle_s::oyRectangle_SetByRectangle().

Referenced by oyRectangle_s::oyRectangle_Copy().

oyRectangle_s * oyRectangle_NewWith ( double  x,
double  y,
double  width,
double  height,
oyObject_s  object 
)

new with geometry

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

References oyRectangle_s::oyRectangle_SetGeo().

Referenced by oyImage_s::oyImage_Create().

void oyRectangle_Normalise ( oyRectangle_s edit_rectangle)

normalise swapped values for width and height

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

Referenced by oyRectangle_s::oyRectangle_MoveInside(), and oyRectangle_s::oyRectangle_Trim().

int oyRectangle_PointIsInside ( oyRectangle_s rectangle,
double  x,
double  y 
)

compare

Version:
Oyranos: 0.1.10
Since:
2007/12/04 (Oyranos: 0.1.8)
Date:
2009/02/23

Referenced by oyRectangle_s::oyRectangle_IsInside().

int oyRectangle_Release ( oyRectangle_s **  obj)

release

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)
void oyRectangle_Round ( oyRectangle_s edit_rectangle)

scale with origin in the top left corner

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

Referenced by oyRectangle_s::oyRectangle_SamplesFromImage().

int oyRectangle_SamplesFromImage ( oyImage_s image,
oyRectangle_s image_rectangle,
oyRectangle_s pixel_rectangle 
)

new from image

Function oyRectangle_SamplesFromImage

Parameters:
[in]imagea image
[in]image_rectangleoptional rectangle from image
[in,out]pixel_rectanglemandatory rectangle for pixel results
Returns:
error
Version:
Oyranos: 0.1.10
Since:
2009/03/13 (Oyranos: 0.1.10)
Date:
2009/06/08

References oyImage_s::height, oyRectangle_s::oyRectangle_Round(), oyRectangle_s::oyRectangle_Scale(), oyRectangle_s::oyRectangle_SetByRectangle(), oyRectangle_s::oyRectangle_SetGeo(), and oyImage_s::width.

Referenced by oyImage_s::oyImage_FillArray(), and oyImage_s::oyImage_ReadArray().

void oyRectangle_Scale ( oyRectangle_s edit_rectangle,
double  factor 
)

scale with origin in the top left corner

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

Referenced by oyImage_s::oyImage_ReadArray(), and oyRectangle_s::oyRectangle_SamplesFromImage().

void oyRectangle_SetByRectangle ( oyRectangle_s edit_rectangle,
oyRectangle_s ref 
)

copy values

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

References oyRectangle_s::oyRectangle_SetGeo().

Referenced by oyImage_s::oyImage_ReadArray(), oyRectangle_s::oyRectangle_NewFrom(), and oyRectangle_s::oyRectangle_SamplesFromImage().

void oyRectangle_SetGeo ( oyRectangle_s edit_rectangle,
double  x,
double  y,
double  width,
double  height 
)
const char * oyRectangle_Show ( oyRectangle_s r)

debug text not so threadsafe

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

Referenced by oyArray2d_s::oyArray2d_ReleaseArray(), and oyImage_s::oyImage_ReadArray().

void oyRectangle_Trim ( oyRectangle_s edit_rectangle,
oyRectangle_s ref 
)

trim edit_rectangle to ref extents

Since:
Oyranos: version 0.1.8
Date:
4 december 2007 (API 0.1.8)

References oyRectangle_s::oyRectangle_Normalise().