Support for dash array

PDF reference 1.7 pages 218-219
This commit is contained in:
alafr 2016-09-18 16:50:20 +03:00 committed by GitHub
parent a944efdac5
commit 1c08703f38

View File

@ -46,11 +46,14 @@ module.exports =
dash: (length, options = {}) ->
return this unless length?
space = options.space ? length
phase = options.phase or 0
@addContent "[#{length} #{space}] #{phase} d"
if Array.isArray length
length = length.join ' '
phase = options.phase or 0
@addContent "[#{length}] #{phase} d"
else
space = options.space ? length
phase = options.phase or 0
@addContent "[#{length} #{space}] #{phase} d"
undash: ->
@addContent "[] 0 d"