mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -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;
|
param.compound = true;
|
||||||
for (var i = 0, l = this.children.length; i < l; i++)
|
for (var i = 0, l = this.children.length; i < l; i++)
|
||||||
Item.draw(this.children[i], ctx, param);
|
Item.draw(this.children[i], ctx, param);
|
||||||
firstChild.setContextStyles(ctx);
|
firstChild._setStyles(ctx);
|
||||||
var fillColor = firstChild.getFillColor(),
|
var fillColor = firstChild.getFillColor(),
|
||||||
strokeColor = firstChild.getStrokeColor();
|
strokeColor = firstChild.getStrokeColor();
|
||||||
if (fillColor) {
|
if (fillColor) {
|
||||||
|
|
|
@ -385,7 +385,7 @@ var Path = this.Path = PathItem.extend({
|
||||||
var fillColor = this.getFillColor(),
|
var fillColor = this.getFillColor(),
|
||||||
strokeColor = this.getStrokeColor();
|
strokeColor = this.getStrokeColor();
|
||||||
if (!param.compound && (fillColor || strokeColor)) {
|
if (!param.compound && (fillColor || strokeColor)) {
|
||||||
this.setContextStyles(ctx);
|
this._setStyles(ctx);
|
||||||
ctx.save();
|
ctx.save();
|
||||||
// If the path only defines a strokeColor or a fillColor,
|
// If the path only defines a strokeColor or a fillColor,
|
||||||
// draw it directly with the globalAlpha set, otherwise
|
// 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) {
|
for (var i in styles) {
|
||||||
var style = this[i]();
|
var style = this[i]();
|
||||||
if (style)
|
if (style)
|
||||||
|
|
Loading…
Reference in a new issue