• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ShadingContent

A shading painted as a content element in a content stream (spec §8.7.4). The shading fills a region using a gradient pattern defined by a shading dictionary.

Inheritance
object
ContentElement
VisualContentElement
ShadingContent
Inherited Members
VisualContentElement.Transform
VisualContentElement.Clip
VisualContentElement.Group
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class ShadingContent : VisualContentElement

Constructors

ShadingContent(string, string, IReadOnlyList<(double Position, PdfColor Color)>, PdfRect)

Initializes a shading content element.

Declaration
public ShadingContent(string shadingType, string colorSpace, IReadOnlyList<(double Position, PdfColor Color)> stops, PdfRect clipRegion)
Parameters
Type Name Description
string shadingType
string colorSpace
IReadOnlyList<(double Position, PdfColor Color)> stops
PdfRect clipRegion

Properties

Bounds

Bounding box of this element in the page's user-space coordinate system (origin at lower-left, y-up, units = points).

Declaration
public override PdfRect Bounds { get; }
Property Value
Type Description
PdfRect
Overrides
ContentElement.Bounds

ClipRegion

Gets the clip rectangle that bounds the shading region.

Declaration
public PdfRect ClipRegion { get; }
Property Value
Type Description
PdfRect

ColorSpace

Gets the color space name used by this shading.

Declaration
public string ColorSpace { get; }
Property Value
Type Description
string

ElementType

The type of this content element.

Declaration
public override ContentElementType ElementType { get; }
Property Value
Type Description
ContentElementType
Overrides
ContentElement.ElementType

ShadingType

Gets the shading type name (Axial, Radial, etc.).

Declaration
public string ShadingType { get; }
Property Value
Type Description
string

Stops

Gets the gradient stops as (position, color) pairs.

Declaration
public IReadOnlyList<(double Position, PdfColor Color)> Stops { get; }
Property Value
Type Description
IReadOnlyList<(double Position, PdfColor Color)>

Methods

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX