pub struct Path {
pub id: String,
pub visibility: Visibility,
pub fill: Option<Fill>,
pub stroke: Option<Stroke>,
pub paint_order: PaintOrder,
pub rendering_mode: ShapeRendering,
pub data: Rc<Path>,
pub abs_transform: Transform,
pub bounding_box: Option<Rect>,
pub stroke_bounding_box: Option<NonZeroRect>,
}Expand description
A path element.
Fields§
§id: StringElement’s ID.
Taken from the SVG itself. Isn’t automatically generated. Can be empty.
visibility: VisibilityElement visibility.
fill: Option<Fill>Fill style.
stroke: Option<Stroke>Stroke style.
paint_order: PaintOrderFill and stroke paint order.
Since markers will be replaced with regular nodes automatically,
usvg doesn’t provide the markers order type. It’s was already done.
paint-order in SVG.
rendering_mode: ShapeRenderingRendering mode.
shape-rendering in SVG.
data: Rc<Path>Segments list.
All segments are in absolute coordinates.
abs_transform: TransformElement’s absolute transform.
Contains all ancestors transforms.
Will be set after calling usvg::Tree::postprocess.
Note that this is not the relative transform present in SVG. The SVG one would be set only on groups.
bounding_box: Option<Rect>Element’s object bounding box.
objectBoundingBox in SVG terms. Meaning it doesn’t affected by parent transforms.
Will be set after calling usvg::Tree::postprocess.
stroke_bounding_box: Option<NonZeroRect>Element’s object bounding box including stroke.
Similar to bounding_box, but includes stroke.
Will have the same value as bounding_box when path has no stroke.