24#ifndef __GSDEFS_H_INCLUDED_
25#define __GSDEFS_H_INCLUDED_
37#define SCALAR_MIN (-2147483647 - 1)
38#define SCALAR_MAX 2147483647
141 inline long operator[](
unsigned int i)
const {
return *(&
x + i); }
256 return !(*
this == dcRect);
449 return !(*
this == dcRect);
470template <
class TRect>
471void intersectWith(TRect& dcRectThis,
const TRect& dcRect,
bool bValidate =
true)
473 if(dcRectThis.m_min.x < dcRect.m_min.x)
474 dcRectThis.m_min.x = dcRect.m_min.x;
475 if(dcRectThis.m_max.x > dcRect.m_max.x)
476 dcRectThis.m_max.x = dcRect.m_max.x;
478 if(dcRectThis.m_min.y < dcRect.m_min.y)
479 dcRectThis.m_min.y = dcRect.m_min.y;
480 if(dcRectThis.m_max.y > dcRect.m_max.y)
481 dcRectThis.m_max.y = dcRect.m_max.y;
483 if(bValidate && (dcRectThis.m_min.x > dcRectThis.m_max.x || dcRectThis.m_min.y > dcRectThis.m_max.y))
492template <
class TRect,
class T>
495 dcRectThis.m_min.x +=
x;
496 dcRectThis.m_max.x +=
x;
497 dcRectThis.m_min.y +=
y;
498 dcRectThis.m_max.y +=
y;
526#define GETBITNEG(flags, bit) (((flags) & (bit)) != (bit))
void * OdGsWindowingSystemID
void intersectWith(TRect &dcRectThis, const TRect &dcRect, bool bValidate=true)
long OdTruncateToLong(double a)
bool operator!=(const OdGsDCPoint &dcPoint) const
bool operator==(const OdGsDCPoint &dcPoint) const
OdGsDCPoint(OdInt32 xx, OdInt32 yy)
OdGsDCPoint & operator=(const OdGsDCPoint &dcPoint)=default
long operator[](unsigned int i) const
bool operator!=(const OdGsDCRectDouble &dcRect) const
OdGsDCRectDouble(const OdGePoint2d &minPoint, const OdGePoint2d &maxPoint)
OdGsDCRectDouble(double xMin, double xMax, double yMin, double yMax)
bool operator==(const OdGsDCRectDouble &dcRect) const
OdGsDCRectDouble & operator=(const OdGsDCRect &dcRect)
OdGsDCRectDouble(const OdGsDCRect &rc)
void offset(long x, long y)
bool operator!=(const OdGsDCRect &dcRect) const
bool within(const OdGsDCRect &dcRect) const
OdGsDCRect(long xMin, long xMax, long yMin, long yMax)
void operator&=(const OdGsDCRect &dcRect)
void intersectWith(const OdGsDCRect &dcRect, bool bValidate=true)
bool isDisjoint(const OdGsDCRect &r) const
bool operator==(const OdGsDCRect &dcRect) const
void operator|=(const OdGsDCRect &dcRect)
OdGsDCRect(const OdGsDCPoint &minPoint, const OdGsDCPoint &maxPoint)
OdGsDCRect & operator=(const OdGsDCRect &dcRect)=default