StdStrBuf C4FoWBeam::getDesc() const { return FormatString("%d:%d@%d:%d%s", getLeftX(1000), getRightX(1000), getLeftEndY(), getRightEndY(), fDirty ? "*" : ""); }
bool Square::isContainingPoint(int x, int y) const { int leftX = getLeftX(); int rightX = getRightX(); int topY = getTopY(); int bottomY = getBottomY(); if (x <= rightX && x >= leftX) if (y <= bottomY && y >= topY) return true; return false; }
bool Square::isContainingPoint(const Point& otherPoint) const { int leftX = getLeftX(); int rightX = getRightX(); int topY = getTopY(); int bottomY = getBottomY(); // compare the otherPoint coordinate with the current shape boundaries if (otherPoint.getX() <= rightX && otherPoint.getX() >= leftX) if (otherPoint.getY() <= bottomY && otherPoint.getY() >= topY) return true; return false; }