[librsvg: 1/5] Add BoundingBox::with_rect()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/5] Add BoundingBox::with_rect()
- Date: Fri, 25 May 2018 14:13:03 +0000 (UTC)
commit 41933d110d1551f4fdb01e93daf7c5fa080d07dd
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Thu May 24 19:22:09 2018 +0300
Add BoundingBox::with_rect()
rsvg_internals/src/bbox.rs | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/rsvg_internals/src/bbox.rs b/rsvg_internals/src/bbox.rs
index 3ea00542..0806d6da 100644
--- a/rsvg_internals/src/bbox.rs
+++ b/rsvg_internals/src/bbox.rs
@@ -22,6 +22,10 @@ impl BoundingBox {
}
}
+ pub fn with_rect(self, rect: Option<cairo::Rectangle>) -> BoundingBox {
+ BoundingBox { rect, ..self }
+ }
+
fn combine(&mut self, src: &BoundingBox, clip: bool) {
if src.rect.is_none() && src.ink_rect.is_none() {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]