pdfSweep 2.0.5 API
iText.PdfCleanup.LineDashPattern Class Reference

Represents the line dash pattern. More...

Classes

class   DashArrayElem
  Class representing a single element of a dash array More...
 

Public Member Functions

  LineDashPattern (PdfArray dashArray, float dashPhase)
  Creates new LineDashPattern object. More...
 
virtual PdfArray  GetDashArray ()
  Getter for the dash array. More...
 
virtual void  SetDashArray (PdfArray dashArray)
  Setter for the dash array. More...
 
virtual float  GetDashPhase ()
  Getter for the dash phase. More...
 
virtual void  SetDashPhase (float dashPhase)
  Setter for the dash phase. More...
 
virtual bool  IsSolid ()
  Checks whether the dashed pattern is solid or not. More...
 

Static Public Member Functions

static Path  ApplyDashPattern (Path path, LineDashPattern lineDashPattern)
  Apply a LineDashPattern along a Path More...
 

Detailed Description

Represents the line dash pattern.

Represents the line dash pattern. The line dash pattern shall control the pattern of dashes and gaps used to stroke paths. It shall be specified by a dash array and a dash phase.

Constructor & Destructor Documentation

◆ LineDashPattern()

iText.PdfCleanup.LineDashPattern.LineDashPattern ( PdfArray  dashArray,
float  dashPhase 
)
inline

Creates new LineDashPattern object.

Parameters
dashArray The dash array. See GetDashArray()
dashPhase The dash phase. See GetDashPhase()

Member Function Documentation

◆ ApplyDashPattern()

static Path iText.PdfCleanup.LineDashPattern.ApplyDashPattern ( Path  path,
LineDashPattern  lineDashPattern 
)
inlinestatic

Apply a LineDashPattern along a Path

Parameters
path input path
lineDashPattern input LineDashPattern
Returns
a dashed Path

◆ GetDashArray()

virtual PdfArray iText.PdfCleanup.LineDashPattern.GetDashArray ( )
inlinevirtual

Getter for the dash array.

Getter for the dash array.

The dash array’s elements is number that specify the lengths of alternating dashes and gaps; the numbers are nonnegative. The elements are expressed in user space units.

Returns
The dash array.

◆ GetDashPhase()

virtual float iText.PdfCleanup.LineDashPattern.GetDashPhase ( )
inlinevirtual

Getter for the dash phase.

Getter for the dash phase.

The dash phase shall specify the distance into the dash pattern at which to start the dash. The elements are expressed in user space units.

Returns
The dash phase.

◆ IsSolid()

virtual bool iText.PdfCleanup.LineDashPattern.IsSolid ( )
inlinevirtual

Checks whether the dashed pattern is solid or not.

Checks whether the dashed pattern is solid or not. It's solid when the size of a dash array is even and sum of all the units off in the array is 0. For example: [3 0 4 0 5 0 6 0] (sum is 0), [3 0 4 0 5 1] (sum is 1).

Returns
is the dashed pattern solid or not

◆ SetDashArray()

virtual void iText.PdfCleanup.LineDashPattern.SetDashArray ( PdfArray  dashArray )
inlinevirtual

Setter for the dash array.

Setter for the dash array. See GetDashArray()

Parameters
dashArray New dash array.

◆ SetDashPhase()

virtual void iText.PdfCleanup.LineDashPattern.SetDashPhase ( float  dashPhase )
inlinevirtual

Setter for the dash phase.

Setter for the dash phase. See GetDashArray()

Parameters
dashPhase New dash phase.