pub struct PathBuilder {
pub path: BezPath,
pub fill: Option<Color>,
pub stroke: Option<Color>,
pub line_width: f32,
pub even_odd: bool,
pub matrix: Affine,
}Expand description
A filled or stroked path, ready to PageEdit::push.
A plain config struct filled in with struct-update syntax, and
PathBuilder::build turns it into the page object. The graphics state it
paints under is stated in full rather than inherited, because a regenerated
stream restates everything from the PDF defaults anyway.
Fields§
§path: BezPathThe outline, in page space.
fill: Option<Color>The fill colour, or None for no fill.
The alpha is honoured — it goes out as an /ExtGState /ca — so a
translucent colour paints a translucent fill. Note that alpha 0 is
therefore invisible, not absent: None is the only spelling of
“do not fill”.
stroke: Option<Color>The stroke colour, or None for no stroke.
The alpha is honoured as /CA, exactly as PathBuilder::fill’s is.
line_width: f32The stroke width in page units.
even_odd: boolWhether the fill uses the even-odd rule rather than the nonzero one.
matrix: AffineA further transform on the path, composed after it.
Implementations§
Source§impl PathBuilder
impl PathBuilder
Trait Implementations§
Source§impl Clone for PathBuilder
impl Clone for PathBuilder
Source§fn clone(&self) -> PathBuilder
fn clone(&self) -> PathBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more