From a3f6a72a512d1c89788a9fd763baf071fde827c5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 20 Jul 2023 18:27:28 +0200 Subject: region: allow ctor from pixman_box32_t --- src/helpers/Region.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/helpers/Region.cpp') 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(&other)->pixman()); -- cgit v1.2.3