Skip to content

Commit 7ca6bb4

Browse files
lisanhu38
authored andcommitted
done using blit_bitmap to convert bitmap to svg
1 parent 22740f2 commit 7ca6bb4

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

plotters/src/evcxr.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,33 @@ pub fn evcxr_figure<
4343
SVGWrapper(buffer, "".to_string())
4444
}
4545

46-
#[cfg(all(feature = "evcxr", feature = "bitmap_backend"))]
47-
pub struct BitMapWrapper(String, String);
46+
// #[cfg(all(feature = "evcxr", feature = "bitmap_backend"))]
47+
// pub struct BitMapWrapper(String, String);
4848

49-
#[cfg(all(feature = "evcxr", feature = "bitmap_backend"))]
50-
impl BitMapWrapper {
51-
pub fn evcxr_display(&self) {
52-
println!("{:?}", self);
53-
}
49+
// #[cfg(all(feature = "evcxr", feature = "bitmap_backend"))]
50+
// impl BitMapWrapper {
51+
// pub fn evcxr_display(&self) {
52+
// println!("{:?}", self);
53+
// }
5454

55-
pub fn style<S: Into<String>>(mut self, style: S) -> Self {
56-
self.1 = style.into();
57-
self
58-
}
59-
}
55+
// pub fn style<S: Into<String>>(mut self, style: S) -> Self {
56+
// self.1 = style.into();
57+
// self
58+
// }
59+
// }
6060

6161
// #[cfg(feature = "evcxr_bitmap_figure")]
62-
#[cfg(all(feature = "evcxr", feature = "bitmap_backend"))]
63-
impl std::fmt::Debug for BitMapWrapper {
64-
fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
65-
let enc = self.0.as_str();
66-
write!(
67-
formatter,
68-
"EVCXR_BEGIN_CONTENT text/html\n<img style=\"{}\" src=\"data:image/png;base64,{}\"/>\nEVCXR_END_CONTENT",
69-
self.1, enc
70-
)
71-
}
72-
}
62+
// #[cfg(all(feature = "evcxr", feature = "bitmap_backend"))]
63+
// impl std::fmt::Debug for BitMapWrapper {
64+
// fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
65+
// let enc = self.0.as_str();
66+
// write!(
67+
// formatter,
68+
// "EVCXR_BEGIN_CONTENT text/html\n<img style=\"{}\" src=\"data:image/png;base64,{}\"/>\nEVCXR_END_CONTENT",
69+
// self.1, enc
70+
// )
71+
// }
72+
// }
7373

7474

7575
/// Start drawing an evcxr figure

0 commit comments

Comments
 (0)