Make #setContextStyles() a 'protected' function.

This commit is contained in:
Jürg Lehni 2011-04-28 13:04:12 +01:00
parent d71450c0b1
commit f69153844b
2 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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)