pub enum PdfPathFillMode {
None = 0,
EvenOdd = 1,
Winding = 2,
}Expand description
Sets the method used to determine the path region to fill.
The default fill mode used by pdfium-render when creating new PdfPagePathObject
instances is PdfPathFillMode::Winding. The fill mode can be changed on an
object-by-object basis by calling the PdfPagePathObject::set_fill_and_stroke_mode() function.
Variants§
None = 0
The path will not be filled.
EvenOdd = 1
The even-odd rule will be used to determine the path region to fill.
The even-odd rule determines whether a point is inside a path by drawing a ray from that point in any direction and simply counting the number of path segments that cross the ray, regardless of direction. If this number is odd, the point is inside; if even, the point is outside. This yields the same results as the nonzero winding number rule for paths with simple shapes, but produces different results for more complex shapes.
More information, including visual examples, can be found in Section 4.4.2 of the PDF Reference Manual, version 1.7, on page 233.
Winding = 2
The non-zero winding number rule will be used to determine the path region to fill.
The nonzero winding number rule determines whether a given point is inside a path by conceptually drawing a ray from that point to infinity in any direction and then examining the places where a segment of the path crosses the ray. Start- ing with a count of 0, the rule adds 1 each time a path segment crosses the ray from left to right and subtracts 1 each time a segment crosses from right to left. After counting all the crossings, if the result is 0, the point is outside the path; otherwise, it is inside.
This is the default fill mode used by pdfium-render when creating new PdfPagePathObject
instances. The fill mode can be changed on an object-by-object basis by calling the
PdfPagePathObject::set_fill_and_stroke_mode() function.
More information, including visual examples, can be found in Section 4.4.2 of the PDF Reference Manual, version 1.7, on page 232.
Trait Implementations§
Source§impl Clone for PdfPathFillMode
impl Clone for PdfPathFillMode
Source§fn clone(&self) -> PdfPathFillMode
fn clone(&self) -> PdfPathFillMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PdfPathFillMode
impl Debug for PdfPathFillMode
Source§impl Default for PdfPathFillMode
impl Default for PdfPathFillMode
Source§fn default() -> Self
fn default() -> Self
Returns the default fill mode used when creating new PdfPagePathObject instances. The fill mode can be changed on an object-by-object basis by calling the PdfPagePathObject::set_fill_and_stroke_mode() function.
Source§impl PartialEq for PdfPathFillMode
impl PartialEq for PdfPathFillMode
impl Copy for PdfPathFillMode
impl StructuralPartialEq for PdfPathFillMode
Auto Trait Implementations§
impl Freeze for PdfPathFillMode
impl RefUnwindSafe for PdfPathFillMode
impl Send for PdfPathFillMode
impl Sync for PdfPathFillMode
impl Unpin for PdfPathFillMode
impl UnwindSafe for PdfPathFillMode
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<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>
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>
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