mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Make #setContextStyles() a 'protected' function.
This commit is contained in:
parent
d71450c0b1
commit
f69153844b
2 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
|
|||
param.compound = true;
|
||||
for (var i = 0, l = this.children.length; i < l; i++)
|
||||
Item.draw(this.children[i], ctx, param);
|
||||
firstChild.setContextStyles(ctx);
|
||||
firstChild._setStyles(ctx);
|
||||
var fillColor = firstChild.getFillColor(),
|
||||
strokeColor = firstChild.getStrokeColor();
|
||||
if (fillColor) {
|
||||
|
|
|
@ -385,7 +385,7 @@ var Path = this.Path = PathItem.extend({
|
|||
var fillColor = this.getFillColor(),
|
||||
strokeColor = this.getStrokeColor();
|
||||
if (!param.compound && (fillColor || strokeColor)) {
|
||||
this.setContextStyles(ctx);
|
||||
this._setStyles(ctx);
|
||||
ctx.save();
|
||||
// If the path only defines a strokeColor or a fillColor,
|
||||
// draw it directly with the globalAlpha set, otherwise
|
||||
|
@ -582,7 +582,7 @@ var Path = this.Path = PathItem.extend({
|
|||
}
|
||||
},
|
||||
|
||||
setContextStyles: function(ctx) {
|
||||
_setStyles: function(ctx) {
|
||||
for (var i in styles) {
|
||||
var style = this[i]();
|
||||
if (style)
|
||||
|
|
Loading…
Reference in a new issue