pub fn viewbox(&self) -> Rect {
        let root = self.tree.root();
        let rect = match *root.borrow() {
            usvg::NodeKind::Svg(svg) => {
                let r = svg.view_box.rect;
                Rect::new(r.left(), r.top(), r.right(), r.bottom())
            }
            _ => {
                tracing::error!(
                    "this SVG has no viewbox. It is expected that usvg always adds a viewbox"
                );
                Rect::ZERO
            }
        };
        rect
    }
/// Get the viewbox for the svg. This is the area that should be drawn.
Get the viewbox for the svg. This is the area that should be drawn.
Get the viewbox for the svg . This is the area that should be drawn .
pub fn viewbox(&self) -> Rect {
        let root = self.tree.root();
        let rect = match *root.borrow() {
            usvg::NodeKind::Svg(svg) => {
                let r = svg.view_box.rect;
                Rect::new(r.left(), r.top(), r.right(), r.bottom())
            }
            _ => {
                tracing::error!(
                    "this SVG has no viewbox. It is expected that usvg always adds a viewbox"
                );
                Rect::ZERO
            }
        };
        rect
    }
pub fn viewbox ( & self ) -> Rect { let root = self . tree . root ( ) ; let rect = match * root . borrow ( ) { usvg :: NodeKind :: Svg ( svg ) => { let r = svg . view_box . rect ; Rect :: new ( r . left ( ) , r . top ( ) , r . right ( ) , r . bottom ( ) ) } _ => { tracing :: error ! ( " " ) ; Rect :: ZERO } } ; rect }
Get the viewbox for the svg.
Get the viewbox for the svg .
&self
&self