Struct PdfPagePathObjectSegments

Source
pub struct PdfPagePathObjectSegments<'a> { /* private fields */ }
Expand description

The collection of PdfPathSegment objects inside a path page object.

The coordinates of each segment in the returned iterator will be the untransformed, raw values supplied at the time the segment was created. Use the PdfPagePathObjectSegments::transform() function to apply a PdfMatrix transformation matrix to the coordinates of each segment as it is returned.

Implementations§

Source§

impl<'a> PdfPagePathObjectSegments<'a>

Source

pub fn transform(&self, matrix: PdfMatrix) -> PdfPagePathObjectSegments<'a>

Returns a new iterator over this collection of PdfPathSegment objects that applies the given PdfMatrix to the points in each returned segment.

Source

pub fn raw(&self) -> PdfPagePathObjectSegments<'a>

Returns a new iterator over this collection of PdfPathSegment objects that ensures the points of each returned segment are untransformed raw values.

Trait Implementations§

Source§

impl<'a> PdfPathSegments<'a> for PdfPagePathObjectSegments<'a>

Source§

fn bindings(&self) -> &'a dyn PdfiumLibraryBindings

Returns the PdfiumLibraryBindings used by this PdfPathSegments collection.
Source§

fn len(&self) -> PdfPathSegmentIndex

Returns the number of path segments in this PdfPathSegments collection.
Source§

fn get( &self, index: PdfPathSegmentIndex, ) -> Result<PdfPathSegment<'a>, PdfiumError>

Returns a single PdfPathSegment from this PdfPathSegments collection.
Source§

fn iter(&'a self) -> PdfPathSegmentsIterator<'a>

Returns an iterator over all the path segments in this PdfPathSegments collection.
Source§

fn is_empty(&self) -> bool

Returns true if this PdfPathSegments collection is empty.
Source§

fn as_range(&self) -> Range<PdfPathSegmentIndex>

Returns a Range from 0..(number of path segments) for this PdfPathSegments collection.
Source§

fn as_range_inclusive(&self) -> RangeInclusive<PdfPathSegmentIndex>

Returns an inclusive Range from 0..=(number of path segments - 1) for this PdfPathSegments collection.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.