mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Save the fill color and restore it after the line wrapper makes a new page
This commit is contained in:
parent
df43e0eeb0
commit
4b3d2c9e30
@ -116,7 +116,8 @@ class LineWrapper extends EventEmitter
|
||||
@column = 1
|
||||
@startY = @document.page.margins.top
|
||||
@maxY = @document.page.maxY()
|
||||
@document.x = x
|
||||
@document.x = x
|
||||
@document.fillColor @document._fillColor... if @document._fillColor
|
||||
@emit 'pageBreak', options, this
|
||||
|
||||
else
|
||||
|
||||
@ -68,6 +68,10 @@ module.exports =
|
||||
fillColor: (color, opacity = 1) ->
|
||||
set = @_setColor color, no
|
||||
@fillOpacity opacity if set
|
||||
|
||||
# save this for text wrapper, which needs to reset
|
||||
# the fill color on new pages
|
||||
@_fillColor = [color, opacity]
|
||||
return this
|
||||
|
||||
strokeColor: (color, opacity = 1) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user