1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00
2022-09-27 21:45:01 +02:00

49 lines
985 B
C++

#pragma once
#include <cstddef>
#include <vector>
#include <Windows.h>
namespace Gdi
{
class Region
{
public:
Region(std::nullptr_t);
Region(HRGN rgn);
Region(const RECT& rect = RECT{ 0, 0, 0, 0 });
Region(HWND hwnd);
~Region();
Region(const Region& other);
Region(Region&& other);
Region& operator=(Region other);
void clear();
std::vector<RECT> getRects() const;
bool isEmpty() const;
void offset(int x, int y);
HRGN release();
operator HRGN() const;
bool operator==(const Region& other) const;
bool operator!=(const Region& other) const;
Region operator&(const Region& other) const;
Region operator|(const Region& other) const;
Region operator-(const Region& other) const;
Region operator&=(const Region& other);
Region operator|=(const Region& other);
Region operator-=(const Region& other);
friend void swap(Region& rgn1, Region& rgn2);
private:
Region& combine(const Region& other, int mode);
HRGN m_region;
};
}