|
|
@@ -30,15 +30,15 @@ pub fn draw_elem( |
|
|
|
match fill { |
|
|
|
Paint::Color(ref color) => match color { |
|
|
|
color::Color::RGB(rgb) => gr.set_source_rgb( |
|
|
|
rgb.r as f64 / 255.0, |
|
|
|
rgb.g as f64 / 255.0, |
|
|
|
rgb.b as f64 / 255.0, |
|
|
|
f64::from(rgb.r) / 255.0, |
|
|
|
f64::from(rgb.g) / 255.0, |
|
|
|
f64::from(rgb.b) / 255.0, |
|
|
|
), |
|
|
|
color::Color::RGBA(rgba) => gr.set_source_rgba( |
|
|
|
rgba.r as f64 / 255.0, |
|
|
|
rgba.g as f64 / 255.0, |
|
|
|
rgba.b as f64 / 255.0, |
|
|
|
rgba.a as f64, |
|
|
|
f64::from(rgba.r) / 255.0, |
|
|
|
f64::from(rgba.g) / 255.0, |
|
|
|
f64::from(rgba.b) / 255.0, |
|
|
|
f64::from(rgba.a), |
|
|
|
), |
|
|
|
}, |
|
|
|
} |
|
|
@@ -76,15 +76,15 @@ pub fn draw_elem( |
|
|
|
match fill { |
|
|
|
Paint::Color(ref color) => match color { |
|
|
|
color::Color::RGB(rgb) => gr.set_source_rgb( |
|
|
|
rgb.r as f64 / 255.0, |
|
|
|
rgb.g as f64 / 255.0, |
|
|
|
rgb.b as f64 / 255.0, |
|
|
|
f64::from(rgb.r) / 255.0, |
|
|
|
f64::from(rgb.g) / 255.0, |
|
|
|
f64::from(rgb.b) / 255.0, |
|
|
|
), |
|
|
|
color::Color::RGBA(rgba) => gr.set_source_rgba( |
|
|
|
rgba.r as f64 / 255.0, |
|
|
|
rgba.g as f64 / 255.0, |
|
|
|
rgba.b as f64 / 255.0, |
|
|
|
rgba.a as f64, |
|
|
|
f64::from(rgba.r) / 255.0, |
|
|
|
f64::from(rgba.g) / 255.0, |
|
|
|
f64::from(rgba.b) / 255.0, |
|
|
|
f64::from(rgba.a), |
|
|
|
), |
|
|
|
}, |
|
|
|
} |
|
|
|