pub struct PathBuilder {
pub path: BezPath,
pub fill: Option<Color>,
pub stroke: Option<Color>,
pub line_width: f32,
pub fill_rule: Fill,
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.
fill_rule: FillThe fill rule, used only when PathBuilder::fill is Some.
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§impl Debug for PathBuilder
impl Debug for PathBuilder
Source§impl Default for PathBuilder
impl Default for PathBuilder
Source§impl PartialEq for PathBuilder
impl PartialEq for PathBuilder
impl StructuralPartialEq for PathBuilder
Auto Trait Implementations§
impl Freeze for PathBuilder
impl RefUnwindSafe for PathBuilder
impl Send for PathBuilder
impl Sync for PathBuilder
impl Unpin for PathBuilder
impl UnsafeUnpin for PathBuilder
impl UnwindSafe for PathBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.