mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
commit
a89b83cb11
@ -192,9 +192,7 @@ html2canvas.Generate.Gradient = function(src, bounds) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( tmp = src.match(/-webkit-linear-gradient\((.*)\)/) ) {
|
if ( tmp = src.match(/-webkit-linear-gradient\((.*)\)/) ) {
|
||||||
|
|
||||||
position = tmp[1].split( ",", 1 )[0];
|
position = tmp[1].split( ",", 1 )[0];
|
||||||
getColors( tmp[1].substr( position.length + 2 ) );
|
getColors( tmp[1].substr( position.length + 2 ) );
|
||||||
position = position.split(' ');
|
position = position.split(' ');
|
||||||
@ -221,8 +219,7 @@ html2canvas.Generate.Gradient = function(src, bounds) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (tmp = src.match(/-webkit-gradient\(linear, (\d+)% (\d+)\%, (\d+)% (\d+)%, from\((.*)\), to\((.*)\)\)/)) {
|
} else if (tmp = src.match(/-webkit-gradient\(linear, (\d+)[%]{0,1} (\d+)[%]{0,1}, (\d+)[%]{0,1} (\d+)[%]{0,1}, from\((.*)\), to\((.*)\)\)/)) {
|
||||||
|
|
||||||
p0 = (tmp[1] * bounds.width) / 100;
|
p0 = (tmp[1] * bounds.width) / 100;
|
||||||
p1 = (tmp[2] * bounds.height) / 100;
|
p1 = (tmp[2] * bounds.height) / 100;
|
||||||
p2 = (tmp[3] * bounds.width) / 100;
|
p2 = (tmp[3] * bounds.width) / 100;
|
||||||
@ -232,7 +229,6 @@ html2canvas.Generate.Gradient = function(src, bounds) {
|
|||||||
steps.push(tmp[6]);
|
steps.push(tmp[6]);
|
||||||
|
|
||||||
} else if (tmp = src.match(/-moz-linear-gradient\((\d+)% (\d+)%, (.*)\)/)) {
|
} else if (tmp = src.match(/-moz-linear-gradient\((\d+)% (\d+)%, (.*)\)/)) {
|
||||||
|
|
||||||
p0 = (tmp[1] * bounds.width) / 100;
|
p0 = (tmp[1] * bounds.width) / 100;
|
||||||
p1 = (tmp[2] * bounds.width) / 100;
|
p1 = (tmp[2] * bounds.width) / 100;
|
||||||
p2 = bounds.width - p0;
|
p2 = bounds.width - p0;
|
||||||
|
@ -67,7 +67,7 @@ html2canvas.Generate.Gradient = function(src, bounds) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (tmp = src.match(/-webkit-gradient\(linear, (\d+)% (\d+)\%, (\d+)% (\d+)%, from\((.*)\), to\((.*)\)\)/)) {
|
} else if (tmp = src.match(/-webkit-gradient\(linear, (\d+)[%]{0,1} (\d+)[%]{0,1}, (\d+)[%]{0,1} (\d+)[%]{0,1}, from\((.*)\), to\((.*)\)\)/)) {
|
||||||
|
|
||||||
p0 = (tmp[1] * bounds.width) / 100;
|
p0 = (tmp[1] * bounds.width) / 100;
|
||||||
p1 = (tmp[2] * bounds.height) / 100;
|
p1 = (tmp[2] * bounds.height) / 100;
|
||||||
@ -77,7 +77,7 @@ html2canvas.Generate.Gradient = function(src, bounds) {
|
|||||||
steps.push(tmp[5]);
|
steps.push(tmp[5]);
|
||||||
steps.push(tmp[6]);
|
steps.push(tmp[6]);
|
||||||
|
|
||||||
} else if (tmp = src.match(/-moz-linear-gradient\((\d+)% (\d+)%, (.*)\)/)) {
|
} else if (tmp = src.match(/-moz-linear-gradient\((\d+)[%]{0,1} (\d+)[%]{0,1}, (.*)\)/)) {
|
||||||
|
|
||||||
p0 = (tmp[1] * bounds.width) / 100;
|
p0 = (tmp[1] * bounds.width) / 100;
|
||||||
p1 = (tmp[2] * bounds.width) / 100;
|
p1 = (tmp[2] * bounds.width) / 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user