Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
RectTmpl< PointType > Class Template Reference

#include <edl/edlgeom.h>

Public Member Functions

 RectTmpl ()
 RectTmpl (PointType ax, PointType ay, PointType adX, PointType adY)
 RectTmpl (const RectTmpl< PointType > &r)=default
 RectTmpl (RectTmpl< PointType > &&p)=default
RectTmpl< PointType > & operator= (const RectTmpl< PointType > &other)=default
void setEmpty ()
bool isEmpty () const
bool equal (const RectTmpl &rect) const
bool operator== (const RectTmpl &rect) const
bool operator!= (const RectTmpl &rect) const
bool similar (const RectTmpl &rect, float epsilon) const
RectTmploffset (PointType offX, PointType offY)
RectTmplinset (PointType insetX, PointType insetY)
 Inset a rectangle by the given values. Will collapse to a point if the rectangle is not enough to service the inset.
bool expandToPoint (const PointTmpl< PointType > &point)
 Expand this rect if necessary to include point.
void intersectRect (const RectTmpl< PointType > &rect)
 Intersect this rect with another rect. If the rects do not intersect, the result is an empty rect.
void unionRect (const RectTmpl< PointType > &rect)
 Unite this rect with another rect.
bool intersectsWithRect (const RectTmpl< PointType > &rect) const
 Does this rect intersect with another rect?
bool containsRect (const RectTmpl< PointType > &rect) const
 Does this rectangle completely contain the given rect?
bool containsPoint (PointType px, PointType py) const
PointType getRight () const
PointType getBottom () const

Public Attributes

PointType x
PointType y
PointType dX
PointType dY

Constructor & Destructor Documentation

◆ RectTmpl() [1/4]

template<typename PointType>
RectTmpl< PointType >::RectTmpl ( )
inline

◆ RectTmpl() [2/4]

template<typename PointType>
RectTmpl< PointType >::RectTmpl ( PointType ax,
PointType ay,
PointType adX,
PointType adY )
inline

◆ RectTmpl() [3/4]

template<typename PointType>
RectTmpl< PointType >::RectTmpl ( const RectTmpl< PointType > & r)
default

◆ RectTmpl() [4/4]

template<typename PointType>
RectTmpl< PointType >::RectTmpl ( RectTmpl< PointType > && p)
default

Member Function Documentation

◆ containsPoint()

template<typename PointType>
bool RectTmpl< PointType >::containsPoint ( PointType px,
PointType py ) const
inline

◆ containsRect()

template<typename PointType>
bool RectTmpl< PointType >::containsRect ( const RectTmpl< PointType > & rect) const
inline

Does this rectangle completely contain the given rect?

◆ equal()

template<typename PointType>
bool RectTmpl< PointType >::equal ( const RectTmpl< PointType > & rect) const
inline

◆ expandToPoint()

template<typename PointType>
bool RectTmpl< PointType >::expandToPoint ( const PointTmpl< PointType > & point)
inline

Expand this rect if necessary to include point.

Parameters
pointThe point to consider
Returns
True if the box needed to be expanded

◆ getBottom()

template<typename PointType>
PointType RectTmpl< PointType >::getBottom ( ) const
inline

◆ getRight()

template<typename PointType>
PointType RectTmpl< PointType >::getRight ( ) const
inline

◆ inset()

template<typename PointType>
RectTmpl & RectTmpl< PointType >::inset ( PointType insetX,
PointType insetY )
inline

Inset a rectangle by the given values. Will collapse to a point if the rectangle is not enough to service the inset.

◆ intersectRect()

template<typename PointType>
void RectTmpl< PointType >::intersectRect ( const RectTmpl< PointType > & rect)
inline

Intersect this rect with another rect. If the rects do not intersect, the result is an empty rect.

◆ intersectsWithRect()

template<typename PointType>
bool RectTmpl< PointType >::intersectsWithRect ( const RectTmpl< PointType > & rect) const
inline

Does this rect intersect with another rect?

◆ isEmpty()

template<typename PointType>
bool RectTmpl< PointType >::isEmpty ( ) const
inline

◆ offset()

template<typename PointType>
RectTmpl & RectTmpl< PointType >::offset ( PointType offX,
PointType offY )
inline

◆ operator!=()

template<typename PointType>
bool RectTmpl< PointType >::operator!= ( const RectTmpl< PointType > & rect) const
inline

◆ operator=()

template<typename PointType>
RectTmpl< PointType > & RectTmpl< PointType >::operator= ( const RectTmpl< PointType > & other)
default

◆ operator==()

template<typename PointType>
bool RectTmpl< PointType >::operator== ( const RectTmpl< PointType > & rect) const
inline

◆ setEmpty()

template<typename PointType>
void RectTmpl< PointType >::setEmpty ( )
inline

◆ similar()

template<typename PointType>
bool RectTmpl< PointType >::similar ( const RectTmpl< PointType > & rect,
float epsilon ) const
inline

◆ unionRect()

template<typename PointType>
void RectTmpl< PointType >::unionRect ( const RectTmpl< PointType > & rect)
inline

Unite this rect with another rect.

Member Data Documentation

◆ dX

template<typename PointType>
PointType RectTmpl< PointType >::dX

◆ dY

template<typename PointType>
PointType RectTmpl< PointType >::dY

◆ x

template<typename PointType>
PointType RectTmpl< PointType >::x

◆ y

template<typename PointType>
PointType RectTmpl< PointType >::y

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