Table of Contents

Class PdfShading

Namespace
PDiffy
Assembly
PDiffy.dll

A shading painted on its own with the sh operator: a gradient or mesh of colors that fills the clipping area without a path. A shading used as a path's fill shows in Fill instead.

public sealed record PdfShading : IEquatable<PdfShading>
Inheritance
PdfShading
Implements
Inherited Members

Properties

BlendMode

How its colors mix with what's drawn under it; Normal paints over it.

public PdfBlendMode BlendMode { get; init; }

Property Value

PdfBlendMode

Clipped

Whether the clipping area leaves it out entirely, so it doesn't show, as for Clipped.

public bool Clipped { get; init; }

Property Value

bool

Covered

Whether something opaque drawn after it covers all of the area it paints, as for Covered.

public bool Covered { get; init; }

Property Value

bool

GroupBlendModes

The blend modes of the transparency groups it's drawn in that BlendMode leaves out because it already holds a mode set inside the group, innermost first. Each mixes its group as a whole with what's under it. Empty when there are none.

public IReadOnlyList<PdfBlendMode> GroupBlendModes { get; init; }

Property Value

IReadOnlyList<PdfBlendMode>

Hash

A hash of what the shading draws, such as "3f9c0a1b2d4e5f60": its type, colors, coordinates and functions, and a mesh's vertex data. "unreadable" when PDiffy can't read the shading, as when the page doesn't define it.

public required string Hash { get; init; }

Property Value

string

Height

The height of the area it paints, in points.

public required double Height { get; init; }

Property Value

double

Layers

The optional-content layers the shading is drawn in, outermost first, by name, such as "Draft"; empty when it's drawn outside optional content.

public IReadOnlyList<string> Layers { get; init; }

Property Value

IReadOnlyList<string>

Opacity

How opaque it is, from 0 (invisible) to 1, rounded to two decimal places; 1 when no graphics state makes it see-through.

public double Opacity { get; init; }

Property Value

double

Page

The page number, counted from 1.

public required int Page { get; init; }

Property Value

int

RenderingIntent

How colors outside what the output device can show are brought into what it can (the ri operator, or /RI in a graphics state); RelativeColorimetric, PDF's default, unless set.

public PdfRenderingIntent RenderingIntent { get; init; }

Property Value

PdfRenderingIntent

Role

Whether the shading is tagged, an artifact, or untagged.

public required PdfContentRole Role { get; init; }

Property Value

PdfContentRole

SoftMask

A hash of the soft masks that make parts of it see-through, as a gradient fade does, including what they draw, such as "3f9c0a1b2d4e5f60", or "unreadable"; null when it has no soft mask.

public string? SoftMask { get; init; }

Property Value

string

Width

The width of the area it paints, in points.

public required double Width { get; init; }

Property Value

double

X

The left edge of the area it paints, in points from the page's left edge: the clipping area's bounding box, cut to the shading's own box when it has one, or the crop box when nothing clips.

public required double X { get; init; }

Property Value

double

Y

The bottom edge of the area it paints, in points from the page's bottom edge.

public required double Y { get; init; }

Property Value

double