libcineon  0.1
Public Member Functions | Public Attributes | List of all members
cineon::Block Struct Reference

Rectangle block definition defined by two points. More...

#include <Cineon.h>

Public Member Functions

 Block ()
 Constructor. More...
 
 Block (const int x1, const int y1, const int x2, const int y2)
 Constructor. More...
 
void Set (const int x1, const int y1, const int x2, const int y2)
 Set the block coordinates. More...
 
bool Inside (const int x, const int y) const
 Check to see if a point is within the block. More...
 
void Check ()
 Rearrange coordinates if necessary so the first coordinate is upper left and the second is lower right. More...
 

Public Attributes

int x1
 
int y1
 
int x2
 
int y2
 

Detailed Description

Rectangle block definition defined by two points.

Constructor & Destructor Documentation

cineon::Block::Block ( )
inline

Constructor.

cineon::Block::Block ( const int  x1,
const int  y1,
const int  x2,
const int  y2 
)
inline

Constructor.

Parameters
x1upper left x coordinate
y1upper left y coordinate
x2lower right x coordinate
y2lower right y coordinate

Member Function Documentation

void cineon::Block::Check ( )
inline

Rearrange coordinates if necessary so the first coordinate is upper left and the second is lower right.

bool cineon::Block::Inside ( const int  x,
const int  y 
) const
inline

Check to see if a point is within the block.

Parameters
xx coordinate
yy coordinate
Returns
true/false if coordinates within block
void cineon::Block::Set ( const int  x1,
const int  y1,
const int  x2,
const int  y2 
)
inline

Set the block coordinates.

Parameters
x1upper left x coordinate
y1upper left y coordinate
x2lower right x coordinate
y2lower right y coordinate

Member Data Documentation

int cineon::Block::x1
int cineon::Block::x2
int cineon::Block::y1
int cineon::Block::y2

The documentation for this struct was generated from the following file: