pub trait PdfPageObjectCommon<'a> {
Show 29 methods fn has_transparency(&self) -> bool; fn bounds(&self) -> Result<PdfRect, PdfiumError>; fn transform(
        &mut self,
        a: f64,
        b: f64,
        c: f64,
        d: f64,
        e: f64,
        f: f64
    ) -> Result<(), PdfiumError>; fn set_blend_mode(
        &mut self,
        blend_mode: PdfPageObjectBlendMode
    ) -> Result<(), PdfiumError>; fn fill_color(&self) -> Result<PdfColor, PdfiumError>; fn set_fill_color(
        &mut self,
        fill_color: PdfColor
    ) -> Result<(), PdfiumError>; fn stroke_color(&self) -> Result<PdfColor, PdfiumError>; fn set_stroke_color(
        &mut self,
        stroke_color: PdfColor
    ) -> Result<(), PdfiumError>; fn stroke_width(&self) -> Result<PdfPoints, PdfiumError>; fn set_stroke_width(
        &mut self,
        stroke_width: PdfPoints
    ) -> Result<(), PdfiumError>; fn line_join(&self) -> Result<PdfPageObjectLineJoin, PdfiumError>; fn set_line_join(
        &mut self,
        line_join: PdfPageObjectLineJoin
    ) -> Result<(), PdfiumError>; fn line_cap(&self) -> Result<PdfPageObjectLineCap, PdfiumError>; fn set_line_cap(
        &mut self,
        line_cap: PdfPageObjectLineCap
    ) -> Result<(), PdfiumError>; fn fill_mode(&self) -> Result<PdfPageObjectFillMode, PdfiumError>; fn is_stroked(&self) -> Result<bool, PdfiumError>; fn set_fill_and_stroke_mode(
        &mut self,
        fill_mode: PdfPageObjectFillMode,
        do_stroke: bool
    ) -> Result<(), PdfiumError>; fn width(&self) -> Result<PdfPoints, PdfiumError> { ... } fn height(&self) -> Result<PdfPoints, PdfiumError> { ... } fn is_inside_rect(&self, rect: &PdfRect) -> bool { ... } fn does_overlap_rect(&self, rect: &PdfRect) -> bool { ... } fn translate(
        &mut self,
        delta_x: PdfPoints,
        delta_y: PdfPoints
    ) -> Result<(), PdfiumError> { ... } fn scale(
        &mut self,
        horizontal_scale_factor: f64,
        vertical_scale_factor: f64
    ) -> Result<(), PdfiumError> { ... } fn rotate_counter_clockwise_degrees(
        &mut self,
        degrees: f32
    ) -> Result<(), PdfiumError> { ... } fn rotate_clockwise_degrees(
        &mut self,
        degrees: f32
    ) -> Result<(), PdfiumError> { ... } fn rotate_counter_clockwise_radians(
        &mut self,
        radians: f32
    ) -> Result<(), PdfiumError> { ... } fn rotate_clockwise_radians(
        &mut self,
        radians: f32
    ) -> Result<(), PdfiumError> { ... } fn skew_degrees(
        &mut self,
        x_axis_skew: f32,
        y_axis_skew: f32
    ) -> Result<(), PdfiumError> { ... } fn skew_radians(
        &mut self,
        x_axis_skew: f32,
        y_axis_skew: f32
    ) -> Result<(), PdfiumError> { ... }
}
Expand description

Functionality common to all PdfPageObject objects, regardless of their PdfPageObjectType.

Required Methods

Returns true if this PdfPageObject contains transparency.

Returns the bounding box of this PdfPageObject.

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

To move, scale, rotate, or skew a PdfPageObject, consider using one or more of the following functions. Internally they all use PdfPageObjectCommon::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.

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

Note that Pdfium does not currently expose a function to read the currently set blend mode.

Returns the color of any filled paths in this PdfPageObject.

Sets the color of any filled paths in this PdfPageObject.

Returns the color of any stroked lines in this PdfPageObject.

Sets the color of any stroked lines in this PdfPageObject.

Even if this 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.

Returns the width of any stroked lines in this PdfPageObject.

Sets the width of any stroked lines in this PdfPageObject.

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

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

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

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

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

Returns the method used to determine which sub-paths of any path in this PdfPageObject should be filled.

Returns true if this PdfPageObject will be stroked, regardless of the path’s stroke settings.

Even if this 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.

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

Even if this 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.

Provided Methods

Returns the width of this PdfPageObject.

Returns the height of this PdfPageObject.

Returns true if the bounds of this PdfPageObject lie entirely within the given rectangle.

Returns true if the bounds of this PdfPageObject lie at least partially within the given rectangle.

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

Changes the size of this PdfPageObject, scaling it by the given horizontal and vertical scale factors.

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

Rotates this PdfPageObject clockwise by the given number of degrees.

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

Rotates this PdfPageObject clockwise by the given number of radians.

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

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

Implementors