1
0
Fork 0
forked from wry/wry

it: test region creation

This commit is contained in:
Julian Orth 2022-05-03 16:30:05 +02:00
parent 6af9d909b8
commit ae34a65efe
9 changed files with 179 additions and 35 deletions

View file

@ -533,7 +533,7 @@ fn rects_to_bands(rects_tmp: &[Rect]) -> Container {
merged
}
#[derive(Copy, Clone, Eq, PartialEq)]
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
enum BuilderOp {
Add,
Sub,
@ -545,6 +545,7 @@ impl Default for BuilderOp {
}
}
#[derive(Debug)]
pub struct RegionBuilder {
base: Rc<Region>,
op: BuilderOp,
@ -599,5 +600,6 @@ impl RegionBuilder {
BuilderOp::Add => self.base.union(&region),
BuilderOp::Sub => self.base.subtract(&region),
};
self.pending.clear();
}
}