15#ifndef RDKIT_STRINGRECT_H
16#define RDKIT_STRINGRECT_H
56 double padding)
const {
57 double wb2 = padding +
width_ / 2.0;
58 double hb2 = padding +
height_ / 2.0;
78 return pt.
x >= tl.
x && pt.
x <= br.
x && pt.
y >= br.
y && pt.
y <= tl.
y;
96 if ((otl.
x >= ttl.
x && otl.
x <= ttr.
x && otl.
y >= tbl.
y &&
98 (otr.
x >= ttl.
x && otr.
x <= ttr.
x && otr.
y >= tbl.
y &&
100 (obr.
x >= ttl.
x && obr.
x <= ttr.
x && obr.
y >= tbl.
y &&
102 (obl.
x >= ttl.
x && obl.
x <= ttr.
x && obl.
y >= tbl.
y &&
106 if ((ttl.
x >= otl.
x && ttl.
x <= otr.
x && ttl.
y >= obl.
y &&
108 (ttr.
x >= otl.
x && ttr.
x <= otr.
x && ttr.
y >= obl.
y &&
110 (tbr.
x >= otl.
x && tbr.
x <= otr.
x && tbr.
y >= obl.
y &&
112 (tbl.
x >= otl.
x && tbl.
x <= otr.
x && tbl.
y >= obl.
y &&
StringRect(const Point2D &offset, const Point2D &g_centre, double w, double h)
bool doesItIntersect(const StringRect &other, double padding=0.0) const
bool isPointInside(const Point2D &pt, double padding=0.0) const
void calcCorners(Point2D &tl, Point2D &tr, Point2D &br, Point2D &bl, double padding) const
void calcCentre(Point2D &c) const