mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Set opacity to 1 if none passed to fillColor and strokeColor
This commit is contained in:
parent
0272b66e00
commit
df43e0eeb0
@ -65,14 +65,14 @@ module.exports =
|
||||
op = if stroke then 'CS' else 'cs'
|
||||
@addContent "/#{space} #{op}"
|
||||
|
||||
fillColor: (color, opacity) ->
|
||||
fillColor: (color, opacity = 1) ->
|
||||
set = @_setColor color, no
|
||||
@fillOpacity opacity if set and opacity?
|
||||
@fillOpacity opacity if set
|
||||
return this
|
||||
|
||||
strokeColor: (color, opacity) ->
|
||||
strokeColor: (color, opacity = 1) ->
|
||||
set = @_setColor color, yes
|
||||
@strokeOpacity opacity if set and opacity?
|
||||
@strokeOpacity opacity if set
|
||||
return this
|
||||
|
||||
opacity: (opacity) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user