PdfOpCmpRc Struct Reference

#include <utils.h>

List of all members.

Public Member Functions

 PdfOpCmpRc (const _JM_NAMESPACE::Rectangle &rc)
bool operator() (const _JM_NAMESPACE::Rectangle &rc) const

Private Attributes

const _JM_NAMESPACE::Rectangle rc_

Detailed Description

Comparator that we can use to find out if another rectangle intersects rectangle specified by this comparator.


Constructor & Destructor Documentation

PdfOpCmpRc::PdfOpCmpRc ( const _JM_NAMESPACE::Rectangle rc  )  [inline]

Consructor.

Parameters:
rc Rectangle used when comparing.

Member Function Documentation

bool PdfOpCmpRc::operator() ( const _JM_NAMESPACE::Rectangle rc  )  const [inline]

Is the intersection of supplied rectangle and rectangle specified in the constructor not empty.

Our rectangle does NOT contain another rectangle if

  • min (xleft-our, xright-our) >= min (xleft, xright)
  • max (xleft-our, xright-our) <= max (xleft, xright)
  • min (yleft-our, yright-our) >= min (yleft, yright)
  • max (yleft-our, yright-our) <= max (yleft, yright)

References _JM_NAMESPACE::GenRect< Coord >::isInitialized(), rc_, and _JM_NAMESPACE::rectangle_intersect().


Member Data Documentation

Rectangle to be compared.

Referenced by operator()().


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