74 #include <nuttx/config.h> 112 CRect::CRect(nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height)
156 nxgl_coord_t x2, nxgl_coord_t y2)
162 nxgl_coord_t swap = x1;
166 nxgl_coord_t width = x2 - x1 + 1;
172 nxgl_coord_t swap = y1;
176 nxgl_coord_t height = y2 - y1 + 1;
180 return CRect(x1, y1, width, height);
198 nxgl_coord_t swap =
m_pos.x;
223 nxgl_coord_t swap =
m_pos.y;
243 nxgl_coord_t x1 = ngl_max(
m_pos.x, rect.
getX());
244 nxgl_coord_t y1 = ngl_max(
m_pos.y, rect.
getY());
245 nxgl_coord_t x2 = ngl_min(
getX2(), rect.
getX2());
246 nxgl_coord_t y2 = ngl_min(
getY2(), rect.
getY2());
265 nxgl_coord_t x1 = ngl_min(
m_pos.x, rect.
getX());
266 nxgl_coord_t y1 = ngl_min(
m_pos.y, rect.
getY());
267 nxgl_coord_t x2 = ngl_max(
getX2(), rect.
getX2());
268 nxgl_coord_t y2 = ngl_max(
getY2(), rect.
getY2());
nxgl_coord_t getY2(void) const
nxgl_coord_t getHeight(void) const
void expandToInclude(const CRect &rect)
void copyTo(CRect &dest) const
nxgl_coord_t getWidth(void) const
nxgl_coord_t getX(void) const
bool intersects(const CRect &rect) const
nxgl_coord_t getX2(void) const
struct nxgl_size_s m_size
void getAddition(const CRect &rect, CRect &dest) const
void setNxRect(FAR const struct nxgl_rect_s *rect)
void setHeight(nxgl_coord_t height)
void clipToIntersect(const CRect &rect)
void getIntersect(const CRect &rect, CRect &dest) const
void setX(nxgl_coord_t x)
bool contains(nxgl_coord_t x, nxgl_coord_t y) const
static CRect fromCoordinates(nxgl_coord_t x1, nxgl_coord_t y1, nxgl_coord_t x2, nxgl_coord_t y2)
void setX2(nxgl_coord_t x2)
void setY2(nxgl_coord_t y2)
void setWidth(nxgl_coord_t width)
nxgl_coord_t getY(void) const
struct nxgl_point_s m_pos
CRect operator &(const CRect &rect)
void setY(nxgl_coord_t y)
CRect operator+(const CRect &rect)