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

A group of PdfPageObject objects contained in the same PdfPageObjects collection. The page objects contained in the group can be manipulated and transformed together as if they were a single object.

Groups are bound to specific pages in the document. To create an empty group, use either the PdfPageObjects::create_new_group() function or the PdfPageGroupObject::empty() function. To create a populated group, use one of the PdfPageGroupObject::new(), PdfPageGroupObject::from_vec(), or PdfPageGroupObject::from_slice() functions.

Implementations

Creates a new, empty PdfPageGroupObject that can be used to hold any page objects on the given PdfPage.

Creates a new PdfPageGroupObject that includes any page objects on the given PdfPage matching the given predicate function.

Creates a new PdfPageGroupObject that includes the given page objects on the given PdfPage.

Creates a new PdfPageGroupObject that includes the given page objects on the given PdfPage.

Returns the number of page objects in this group.

Returns true if this group contains no page objects.

Returns true if this group already contains the given page object.

Adds a single PdfPageObject to this group.

Adds all the given PdfPageObject objects to this group.

Removes every PdfPageObject in this group from the group’s containing PdfPage.

Each object’s memory ownership will be removed from the PdfPageObjects collection for this group’s containing PdfPage. The objects will also be removed from this group, and the memory owned by each object will be freed. The group will be empty at the end of this operation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

Returns a single PdfPageObject from this group.

Returns an iterator over all the PdfPageObject objects in this group.

Returns the text contained within all PdfPageTextObject objects in this group.

Returns the text contained within all PdfPageTextObject objects in this group, separating each text fragment with the given separator.

Returns true if any PdfPageObject in this group contains transparency.

Returns the bounding box of this group of objects. Since the bounds of every object in the group must be considered, this function has runtime complexity of O(n).

Applies the given transformation, expressed as six values representing the six configurable elements of a nine-element 3x3 PDF transformation matrix, to every PdfPageObject in this group.

To move, scale, rotate, or skew the page objects in this group, consider using one or more of the following functions. Internally they all use PdfPageGroupObject::transform(), but are probably easier to use (and certainly clearer in their intent) in most situations.

The order in which transformations are applied to a page object is significant. For example, the result of rotating then translating a page object may be vastly different from translating then rotating the same page object.

An overview of PDF transformation matrices can be found in the PDF Reference Manual version 1.7 on page 204; a detailed description can be founded in section 4.2.3 on page 207.

Moves the origin of every PdfPageObject in this group by the given horizontal and vertical delta distances.

Changes the size of every PdfPageObject in this group, scaling them by the given horizontal and vertical scale factors.

Rotates every PdfPageObject in this group counter-clockwise by the given number of degrees.

Rotates every PdfPageObject in this group clockwise by the given number of degrees.

Rotates every PdfPageObject in this group counter-clockwise by the given number of radians.

Rotates every PdfPageObject in this group clockwise by the given number of radians.

Skews the axes of every PdfPageObject in this group by the given angles in degrees.

Skews the axes of every PdfPageObject in this group by the given angles in radians.

Sets the blend mode that will be applied when painting every PdfPageObject in this group.

Sets the color of any filled paths in every PdfPageObject in this group.

Sets the color of any stroked lines in every PdfPageObject in this group.

Even if an object’s path is set with a visible color and a non-zero stroke width, the object’s stroke mode must be set in order for strokes to actually be visible.

Sets the width of any stroked lines in every PdfPageObject in this group.

A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide. However, some devices cannot reproduce 1-pixel lines, and on high-resolution devices, they are nearly invisible. Since the results of rendering such zero-width lines are device-dependent, their use is not recommended.

Even if an object’s path is set with a visible color and a non-zero stroke width, the object’s stroke mode must be set in order for strokes to actually be visible.

Sets the line join style that will be used when painting stroked path segments in every PdfPageObject in this group.

Sets the line cap style that will be used when painting stroked path segments in every PdfPageObject in this group.

Sets the method used to determine which sub-paths of any path in a PdfPageObject should be filled, and whether or not any path in a PdfPageObject should be stroked, for every PdfPageObject in this group.

Even if an object’s path is set to be stroked, the stroke must be configured with a visible color and a non-zero width in order to actually be visible.

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
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.