byteman  1.3 (Build #225)
Bitstream relocation and manipulation tool
Functions
rect Namespace Reference

Functions

bool empty (Rect2D r)
 
Rect2D getOverlap (Rect2D r1, Rect2D r2)
 

Function Documentation

◆ empty()

bool rect::empty ( Rect2D  r)
inline

Definition at line 48 of file Coords.h.

48  {
49  return (0 >= r.size.row || 0 >= r.size.col);
50  }
int col
Definition: Coords.h:25
int row
Definition: Coords.h:24
Coord2D size
Definition: Coords.h:31

References Coord2D::col, Coord2D::row, and Rect2D::size.

Referenced by writeBitstreamMain(), and writeBitstreamMainSingleRegion().

Here is the caller graph for this function:

◆ getOverlap()

Rect2D rect::getOverlap ( Rect2D  r1,
Rect2D  r2 
)
inline

Definition at line 34 of file Coords.h.

34  {
35  Rect2D retRect;
36  retRect.position.col = std::max(r1.position.col, r2.position.col);
37  retRect.size.col = std::min((r1.position.col + r1.size.col), (r2.position.col + r2.size.col)) - retRect.position.col;
38  if(0 > retRect.size.col)
39  retRect.size.col = 0;
40 
41  retRect.position.row = std::max(r1.position.row, r2.position.row);
42  retRect.size.row = std::min((r1.position.row + r1.size.row), (r2.position.row + r2.size.row)) - retRect.position.row;
43  if(0 > retRect.size.row)
44  retRect.size.row = 0;
45 
46  return retRect;
47  }
Definition: Coords.h:29
Coord2D position
Definition: Coords.h:30

References Coord2D::col, Rect2D::position, Coord2D::row, and Rect2D::size.

Referenced by writeBitstreamMain(), and writeBitstreamMainSingleSLR().

Here is the caller graph for this function: