pub enum PdfPathFillMode {
None,
EvenOdd,
Winding,
}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
The path will not be filled.
EvenOdd
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
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
sourceimpl Clone for PdfPathFillMode
impl Clone for PdfPathFillMode
sourcefn clone(&self) -> PdfPathFillMode
fn clone(&self) -> PdfPathFillMode
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for PdfPathFillMode
impl Debug for PdfPathFillMode
sourceimpl Default for PdfPathFillMode
impl Default for PdfPathFillMode
sourcefn 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.
sourceimpl PartialEq<PdfPathFillMode> for PdfPathFillMode
impl PartialEq<PdfPathFillMode> for PdfPathFillMode
sourcefn eq(&self, other: &PdfPathFillMode) -> bool
fn eq(&self, other: &PdfPathFillMode) -> bool
impl Copy for PdfPathFillMode
impl StructuralPartialEq for PdfPathFillMode
Auto Trait Implementations
impl RefUnwindSafe for PdfPathFillMode
impl Send for PdfPathFillMode
impl Sync for PdfPathFillMode
impl Unpin for PdfPathFillMode
impl UnwindSafe for PdfPathFillMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_big_endian().sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_native_endian().