mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
parent
7a6ee5d5f4
commit
ecfa09e676
2 changed files with 6 additions and 4 deletions
|
@ -674,8 +674,7 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
this._updateVersion++;
|
||||
ctx.save();
|
||||
matrix.applyToContext(ctx);
|
||||
// Use new Base() so we can use param.extend() to easily override
|
||||
// values
|
||||
// Use new Base() so we can use param.extend() to easily override values
|
||||
var param = new Base({
|
||||
offset: new Point(0, 0),
|
||||
pixelRatio: pixelRatio,
|
||||
|
|
|
@ -374,7 +374,10 @@ new function() {
|
|||
// We need to define style attributes first, and merge in all others after,
|
||||
// since transform needs to be applied after fill color, as transformations
|
||||
// can affect gradient fills.
|
||||
var attributes = Base.each(SVGStyles, function(entry) {
|
||||
// Use Base.set() to control sequence of attributes and have all entries in
|
||||
// SVGStyles (e.g. 'stroke') before the additional attributes below (e.g.
|
||||
// 'stroke-opacity'). See issue #694.
|
||||
var attributes = Base.set(Base.each(SVGStyles, function(entry) {
|
||||
this[entry.attribute] = function(item, value) {
|
||||
item[entry.set](convertValue(value, entry.type, entry.fromSVG));
|
||||
// When applying gradient colors to shapes, we need to offset
|
||||
|
@ -388,7 +391,7 @@ new function() {
|
|||
item.getPosition(true).negate()));
|
||||
}
|
||||
};
|
||||
}, {
|
||||
}, {}), {
|
||||
id: function(item, value) {
|
||||
definitions[value] = item;
|
||||
if (item.setName)
|
||||
|
|
Loading…
Reference in a new issue