@@ -34,8 +34,9 @@ function renderCell(cell, rowStruct) {
3434 if ( cell . backgroundColor != null ) {
3535 this . document
3636 . save ( )
37+ . fillColor ( cell . backgroundColor )
3738 . rect ( cell . x , cell . y , cell . width , cell . height )
38- . fill ( cell . backgroundColor )
39+ . fill ( )
3940 . restore ( ) ;
4041 }
4142
@@ -173,8 +174,9 @@ function renderBorder(border, borderColor, x, y, width, height, mask) {
173174 doc
174175 . save ( )
175176 . lineWidth ( border . top )
177+ . strokeColor ( borderColor . top )
176178 . rect ( x , y , width , height )
177- . stroke ( borderColor . top )
179+ . stroke ( )
178180 . restore ( ) ;
179181 }
180182 } else {
@@ -184,8 +186,9 @@ function renderBorder(border, borderColor, x, y, width, height, mask) {
184186 . save ( )
185187 . lineWidth ( border . top )
186188 . moveTo ( x , y )
189+ . strokeColor ( borderColor . top )
187190 . lineTo ( x + width , y )
188- . stroke ( borderColor . top )
191+ . stroke ( )
189192 . restore ( ) ;
190193 }
191194 // Right
@@ -194,8 +197,9 @@ function renderBorder(border, borderColor, x, y, width, height, mask) {
194197 . save ( )
195198 . lineWidth ( border . right )
196199 . moveTo ( x + width , y )
200+ . strokeColor ( borderColor . right )
197201 . lineTo ( x + width , y + height )
198- . stroke ( borderColor . right )
202+ . stroke ( )
199203 . restore ( ) ;
200204 }
201205 // Bottom
@@ -204,8 +208,9 @@ function renderBorder(border, borderColor, x, y, width, height, mask) {
204208 . save ( )
205209 . lineWidth ( border . bottom )
206210 . moveTo ( x + width , y + height )
211+ . strokeColor ( borderColor . bottom )
207212 . lineTo ( x , y + height )
208- . stroke ( borderColor . bottom )
213+ . stroke ( )
209214 . restore ( ) ;
210215 }
211216 // Left
@@ -214,8 +219,9 @@ function renderBorder(border, borderColor, x, y, width, height, mask) {
214219 . save ( )
215220 . lineWidth ( border . left )
216221 . moveTo ( x , y + height )
222+ . strokeColor ( borderColor . left )
217223 . lineTo ( x , y )
218- . stroke ( borderColor . left )
224+ . stroke ( )
219225 . restore ( ) ;
220226 }
221227 }
0 commit comments