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§
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<PdfPathFillMode> for PdfPathFillMode
impl PartialEq<PdfPathFillMode> for PdfPathFillMode
source§fn eq(&self, other: &PdfPathFillMode) -> bool
fn eq(&self, other: &PdfPathFillMode) -> bool
self and other values to be equal, and is used
by ==.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§
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<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,
source§fn 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().