Internal: Hyprland box implementation (#3755)

* box impl

* remove unused operators

* missed applyfromwlr
This commit is contained in:
Vaxry
2023-11-04 17:03:05 +00:00
committed by GitHub
parent 73e78f05ad
commit 55b4f84fea
47 changed files with 520 additions and 352 deletions

View File

@@ -15,6 +15,8 @@ class CRegion {
CRegion(double x, double y, double w, double h);
/* Create from a wlr_box */
CRegion(wlr_box* box);
/* Create from a CBox */
CRegion(CBox* box);
/* Create from a pixman_box32_t */
CRegion(pixman_box32_t* box);
@@ -43,7 +45,7 @@ class CRegion {
CRegion& translate(const Vector2D& vec);
CRegion& invert(pixman_box32_t* box);
CRegion& scale(float scale);
wlr_box getExtents();
CBox getExtents();
bool containsPoint(const Vector2D& vec) const;
bool empty() const;
Vector2D closestPoint(const Vector2D& vec) const;
@@ -51,7 +53,7 @@ class CRegion {
std::vector<pixman_box32_t> getRects() const;
pixman_region32_t* pixman() {
return &m_rRegion;
return &m_rRegion;
}
private: