struct

PDF::Content::GraphicsState::DashPattern

Inherits Struct < Value < Object

Dash pattern for stroked paths.

# Solid line (default)
dash = DashPattern.new

# Dashed line: 5 on, 3 off
dash = DashPattern.new([5, 3])

# Dashed line with phase offset
dash = DashPattern.new([5, 3], phase: 2)

Constructors

new(array : Array(Float64) = [] of Float64, phase : Float64 = 0.0)
Source
new(array : Array(Int32), phase : Number = 0)

Creates from integer array (convenience)

Source

Instance methods

array
Source
phase
Source
solid?

Returns true if this is a solid line (no dashing)

Source
to_pdf

Formats for PDF output: [dash1 dash2 ...] phase

Source