pub struct PolylineAnnotation {
pub vertices: Vec<Point>,
pub line_color: Option<Color>,
pub line_width: f64,
pub start_style: LineEndingStyle,
pub end_style: LineEndingStyle,
pub interior_color: Option<Color>,
pub border_style: BorderStyle,
pub opacity: f64,
}Expand description
Polyline annotation - displays an open polyline on the page
Fields§
§vertices: Vec<Point>Vertices of the polyline
line_color: Option<Color>Line color
line_width: f64Line width in points
start_style: LineEndingStyleLine ending style at start
end_style: LineEndingStyleLine ending style at end
interior_color: Option<Color>Interior color for line endings
border_style: BorderStyleBorder style
opacity: f64Opacity (0.0 to 1.0)
Implementations§
Source§impl PolylineAnnotation
impl PolylineAnnotation
Sourcepub fn with_line_color(self, color: Option<Color>) -> Self
pub fn with_line_color(self, color: Option<Color>) -> Self
Set line color
Sourcepub fn with_line_width(self, width: f64) -> Self
pub fn with_line_width(self, width: f64) -> Self
Set line width
Sourcepub fn with_endings(self, start: LineEndingStyle, end: LineEndingStyle) -> Self
pub fn with_endings(self, start: LineEndingStyle, end: LineEndingStyle) -> Self
Set line ending styles
Sourcepub fn with_interior_color(self, color: Option<Color>) -> Self
pub fn with_interior_color(self, color: Option<Color>) -> Self
Set interior color for line endings
Sourcepub fn with_border_style(self, style: BorderStyle) -> Self
pub fn with_border_style(self, style: BorderStyle) -> Self
Set border style
Sourcepub fn with_opacity(self, opacity: f64) -> Self
pub fn with_opacity(self, opacity: f64) -> Self
Set opacity
Sourcepub fn calculate_rect(&self) -> Rectangle
pub fn calculate_rect(&self) -> Rectangle
Calculate bounding rectangle
Sourcepub fn to_annotation(&self) -> Result<Annotation>
pub fn to_annotation(&self) -> Result<Annotation>
Convert to PDF annotation
Trait Implementations§
Source§impl Clone for PolylineAnnotation
impl Clone for PolylineAnnotation
Source§fn clone(&self) -> PolylineAnnotation
fn clone(&self) -> PolylineAnnotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolylineAnnotation
impl Debug for PolylineAnnotation
Auto Trait Implementations§
impl Freeze for PolylineAnnotation
impl RefUnwindSafe for PolylineAnnotation
impl Send for PolylineAnnotation
impl Sync for PolylineAnnotation
impl Unpin for PolylineAnnotation
impl UnwindSafe for PolylineAnnotation
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().