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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

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.

This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.