mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
24 lines
488 B
C
24 lines
488 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <AK/Vector.h>
|
||
|
|
#include <SharedGraphics/Rect.h>
|
||
|
|
|
||
|
|
class DisjointRectSet {
|
||
|
|
public:
|
||
|
|
DisjointRectSet() { }
|
||
|
|
~DisjointRectSet() { }
|
||
|
|
DisjointRectSet(DisjointRectSet&& other) : m_rects(move(other.m_rects)) { }
|
||
|
|
|
||
|
|
void add(const Rect&);
|
||
|
|
|
||
|
|
void clear() { m_rects.clear(); }
|
||
|
|
void clear_with_capacity() { m_rects.clear_with_capacity(); }
|
||
|
|
const Vector<Rect>& rects() const { return m_rects; }
|
||
|
|
|
||
|
|
private:
|
||
|
|
void shatter();
|
||
|
|
|
||
|
|
Vector<Rect> m_rects;
|
||
|
|
};
|
||
|
|
|