Trait Paint

Source
pub trait Paint: Debug {
    // Required methods
    fn at(&self, point: Point) -> LinColor;
    fn units(&self) -> Option<Units>;
    fn transform(&self) -> Transform;
    fn to_json(&self) -> Result<Value, SvgParserError>;
}
Expand description

Common interface for anything that can be used to fill an area

Required Methods§

Source

fn at(&self, point: Point) -> LinColor

Source

fn units(&self) -> Option<Units>

Source

fn transform(&self) -> Transform

Source

fn to_json(&self) -> Result<Value, SvgParserError>

Convert paint to JSON value

Trait Implementations§

Source§

impl Paint for Box<dyn Paint>

Source§

fn at(&self, point: Point) -> LinColor

Source§

fn units(&self) -> Option<Units>

Source§

fn transform(&self) -> Transform

Source§

fn to_json(&self) -> Result<Value, SvgParserError>

Convert paint to JSON value

Implementations on Foreign Types§

Source§

impl Paint for Box<dyn Paint>

Source§

impl Paint for Rc<dyn Paint>

Source§

impl Paint for Arc<dyn Paint>

Source§

impl<P: Paint> Paint for &P

Implementors§