This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1use super::CSSRenderable; 2use crate::{ColorMapping, Fill}; 3 4impl CSSRenderable for Fill { 5 fn render_to_css_filled(&self, colormap: &ColorMapping) -> String { 6 match self { 7 Fill::Solid(color) => { 8 format!("fill: {};", color.render(colormap)) 9 } 10 Fill::Translucent(color, opacity) => { 11 format!("fill: {}; opacity: {};", color.render(colormap), opacity) 12 } 13 Fill::Dotted(..) | Fill::Hatches(..) => { 14 format!("fill: url(#{});", self.pattern_id()) 15 } 16 } 17 } 18 19 fn render_to_css_stroked(&self, colormap: &ColorMapping) -> String { 20 match self { 21 Fill::Solid(color) => { 22 format!("stroke: {}; fill: transparent;", color.render(colormap)) 23 } 24 Fill::Translucent(color, opacity) => { 25 format!( 26 "stroke: {}; opacity: {}; fill: transparent;", 27 color.render(colormap), 28 opacity 29 ) 30 } 31 Fill::Dotted(..) => unimplemented!(), 32 Fill::Hatches(..) => unimplemented!(), 33 } 34 } 35}