Skip to content

Commit 3e002e6

Browse files
committed
only fill the background if matte is set
- prevents an empty <rect/> at the beginning of every svg export - fixes samizdatco#91
1 parent 8904658 commit 3e002e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/context/page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl Page{
116116
let mut compositor = PictureRecorder::new();
117117
compositor.begin_recording(self.bounds, None);
118118
if let Some(output) = compositor.recording_canvas() {
119-
output.clear(matte.unwrap_or(Color::TRANSPARENT));
119+
matte.map(|c| output.clear(c));
120120
for pict in self.layers.iter(){
121121
pict.playback(output);
122122
}

0 commit comments

Comments
 (0)