diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 18:27:28 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 18:27:28 +0200 |
| commit | a3f6a72a512d1c89788a9fd763baf071fde827c5 (patch) | |
| tree | 6b276c9df8edce20979e6ed858cf5049a19ab3fd /src/helpers/Region.cpp | |
| parent | d2a8b8c2de91b748f0c03ef36ecc3e2b7e4fceab (diff) | |
region: allow ctor from pixman_box32_t
Diffstat (limited to 'src/helpers/Region.cpp')
| -rw-r--r-- | src/helpers/Region.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Region.cpp b/src/helpers/Region.cpp index 3a210d06..e510e3d3 100644 --- a/src/helpers/Region.cpp +++ b/src/helpers/Region.cpp @@ -18,6 +18,10 @@ CRegion::CRegion(wlr_box* box) { pixman_region32_init_rect(&m_rRegion, box->x, box->y, box->width, box->height); } +CRegion::CRegion(pixman_box32_t* box) { + pixman_region32_init_rect(&m_rRegion, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1); +} + CRegion::CRegion(const CRegion& other) { pixman_region32_init(&m_rRegion); pixman_region32_copy(&m_rRegion, const_cast<CRegion*>(&other)->pixman()); |
