mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
SVGExport: Remove unnecessary calls to Point#transform() in exportGradient()
This commit is contained in:
parent
9e8fcee8cd
commit
adc5b86d2e
1 changed files with 3 additions and 4 deletions
|
@ -192,15 +192,15 @@ new function() {
|
|||
function exportGradient(color) {
|
||||
// NOTE: As long as the fillTransform attribute is not implemented,
|
||||
// we need to create a separate gradient object for each gradient,
|
||||
// even when they share the same gradient defintion.
|
||||
// even when they share the same gradient definition.
|
||||
// http://www.svgopen.org/2011/papers/20-Separating_gradients_from_geometry/
|
||||
// TODO: Implement gradient merging in SvgImport
|
||||
var gradientNode = getDefinition(color, 'color');
|
||||
if (!gradientNode) {
|
||||
var gradient = color.getGradient(),
|
||||
radial = gradient._radial,
|
||||
origin = color.getOrigin().transform(),
|
||||
destination = color.getDestination().transform(),
|
||||
origin = color.getOrigin(),
|
||||
destination = color.getDestination(),
|
||||
attrs;
|
||||
if (radial) {
|
||||
attrs = {
|
||||
|
@ -210,7 +210,6 @@ new function() {
|
|||
};
|
||||
var highlight = color.getHighlight();
|
||||
if (highlight) {
|
||||
highlight = highlight.transform();
|
||||
attrs.fx = highlight.x;
|
||||
attrs.fy = highlight.y;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue