corrected border drawing with multiple colors

initial code for border-radius implemented
This commit is contained in:
Niklas von Hertzen
2012-06-26 15:15:46 +03:00
parent 311a67ee22
commit cce6e3537c
4 changed files with 123 additions and 14 deletions

View File

@@ -147,11 +147,24 @@ _html2canvas.Renderer.Canvas = function( options ) {
if (!usingFlashcanvas || renderItem['arguments'][0] + renderItem['arguments'][2] < flashMaxSize && renderItem['arguments'][1] + renderItem['arguments'][3] < flashMaxSize) {
ctx.fillRect.apply( ctx, renderItem['arguments'] );
}
}else if(renderItem.name === "fillText") {
} else if (renderItem.name === "drawShape") {
( function( args ) {
var i, len = args.length;
ctx.beginPath();
for ( i = 0; i < len; i++ ) {
ctx[ args[ i ].name ].apply( ctx, args[ i ]['arguments'] );
}
ctx.closePath();
ctx.fill();
})( renderItem['arguments'] );
} else if (renderItem.name === "fillText") {
if (!usingFlashcanvas || renderItem['arguments'][1] < flashMaxSize && renderItem['arguments'][2] < flashMaxSize) {
ctx.fillText.apply( ctx, renderItem['arguments'] );
}
}else if(renderItem.name === "drawImage") {
} else if (renderItem.name === "drawImage") {
if (renderItem['arguments'][8] > 0 && renderItem['arguments'][7]){
if ( hasCTX && options.taintTest ) {