a:141:{s:9:"#provides";s:21:"dojox.gfx.silverlight";s:9:"#resource";s:18:"gfx/silverlight.js";s:9:"#requires";a:3:{i:0;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.gfx._base";}i:1;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.gfx.shape";}i:2;a:2:{i:0;s:6:"common";i:1;s:14:"dojox.gfx.path";}}s:15:"dojox.gfx.Group";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:15:"dojox.gfx.Shape";}s:4:"call";a:2:{i:0;s:15:"dojox.gfx.Shape";i:1;s:37:"dojox.gfx.silverlight.Container._init";}}s:7:"summary";s:102:"a group shape (Silverlight), which can be used
to logically group shapes (e.g, to propagate matricies)";s:6:"source";s:51:" dojox.gfx.silverlight.Container._init.call(this);";s:6:"mixins";a:1:{s:9:"prototype";a:2:{i:0;s:31:"dojox.gfx.silverlight.Container";i:1;s:23:"dojox.gfx.shape.Creator";}}s:9:"classlike";b:1;}s:26:"dojox.gfx.Group.setRawNode";a:5:{s:9:"prototype";s:15:"dojox.gfx.Group";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"rawNode";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:19:"an Silverlight node";}}s:6:"source";s:25:" this.rawNode = rawNode;";s:7:"summary";s:52:"sets a raw Silverlight node to be used by this shape";}s:23:"dojox.gfx.Group.rawNode";a:2:{s:8:"instance";s:15:"dojox.gfx.Group";s:7:"summary";s:0:"";}s:34:"dojox.gfx.Group.setRawNode.rawNode";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:19:"an Silverlight node";}s:14:"dojox.gfx.Rect";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:20:"dojox.gfx.shape.Rect";}s:4:"call";a:1:{i:0;s:20:"dojox.gfx.shape.Rect";}}s:7:"summary";s:31:"a rectangle shape (Silverlight)";s:9:"classlike";b:1;}s:23:"dojox.gfx.Rect.setShape";a:6:{s:9:"prototype";s:14:"dojox.gfx.Rect";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:24:"a rectangle shape object";}}s:6:"source";s:241:" this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = n.width;
r.height = n.height;
r.radiusX = r.radiusY = n.r;
return this._applyTransform(); // self";s:7:"summary";s:43:"sets a rectangle shape object (Silverlight)";s:7:"returns";s:4:"self";}s:33:"dojox.gfx.Rect._getAdjustedMatrix";a:6:{s:9:"prototype";s:14:"dojox.gfx.Rect";s:4:"type";s:8:"Function";s:6:"source";s:133:" var m = this.matrix, s = this.shape, d = {dx: s.x, dy: s.y};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D";s:7:"summary";s:61:"returns the adjusted ("real") transformation matrix";s:7:"returns";s:18:"dojox.gfx.Matrix2D";s:7:"private";b:1;}s:20:"dojox.gfx.Rect.shape";a:2:{s:8:"instance";s:14:"dojox.gfx.Rect";s:7:"summary";s:0:"";}s:19:"dojox.gfx.Rect.bbox";a:2:{s:8:"instance";s:14:"dojox.gfx.Rect";s:7:"summary";s:0:"";}s:17:"dojox.gfx.Ellipse";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:23:"dojox.gfx.shape.Ellipse";}s:4:"call";a:1:{i:0;s:23:"dojox.gfx.shape.Ellipse";}}s:7:"summary";s:30:"an ellipse shape (Silverlight)";s:9:"classlike";b:1;}s:26:"dojox.gfx.Ellipse.setShape";a:6:{s:9:"prototype";s:17:"dojox.gfx.Ellipse";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:23:"an ellipse shape object";}}s:6:"source";s:209:" this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = 2 * n.rx;
r.height = 2 * n.ry;
return this._applyTransform(); // self";s:7:"summary";s:42:"sets an ellipse shape object (Silverlight)";s:7:"returns";s:4:"self";}s:36:"dojox.gfx.Ellipse._getAdjustedMatrix";a:6:{s:9:"prototype";s:17:"dojox.gfx.Ellipse";s:4:"type";s:8:"Function";s:6:"source";s:149:" var m = this.matrix, s = this.shape, d = {dx: s.cx - s.rx, dy: s.cy - s.ry};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D";s:7:"summary";s:61:"returns the adjusted ("real") transformation matrix";s:7:"returns";s:18:"dojox.gfx.Matrix2D";s:7:"private";b:1;}s:23:"dojox.gfx.Ellipse.shape";a:2:{s:8:"instance";s:17:"dojox.gfx.Ellipse";s:7:"summary";s:0:"";}s:22:"dojox.gfx.Ellipse.bbox";a:2:{s:8:"instance";s:17:"dojox.gfx.Ellipse";s:7:"summary";s:0:"";}s:16:"dojox.gfx.Circle";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:22:"dojox.gfx.shape.Circle";}s:4:"call";a:1:{i:0;s:22:"dojox.gfx.shape.Circle";}}s:7:"summary";s:28:"a circle shape (Silverlight)";s:9:"classlike";b:1;}s:25:"dojox.gfx.Circle.setShape";a:6:{s:9:"prototype";s:16:"dojox.gfx.Circle";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:21:"a circle shape object";}}s:6:"source";s:195:" this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = r.height = 2 * n.r;
return this._applyTransform(); // self";s:7:"summary";s:40:"sets a circle shape object (Silverlight)";s:7:"returns";s:4:"self";}s:35:"dojox.gfx.Circle._getAdjustedMatrix";a:6:{s:9:"prototype";s:16:"dojox.gfx.Circle";s:4:"type";s:8:"Function";s:6:"source";s:147:" var m = this.matrix, s = this.shape, d = {dx: s.cx - s.r, dy: s.cy - s.r};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D";s:7:"summary";s:61:"returns the adjusted ("real") transformation matrix";s:7:"returns";s:18:"dojox.gfx.Matrix2D";s:7:"private";b:1;}s:22:"dojox.gfx.Circle.shape";a:2:{s:8:"instance";s:16:"dojox.gfx.Circle";s:7:"summary";s:0:"";}s:21:"dojox.gfx.Circle.bbox";a:2:{s:8:"instance";s:16:"dojox.gfx.Circle";s:7:"summary";s:0:"";}s:14:"dojox.gfx.Line";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:20:"dojox.gfx.shape.Line";}s:4:"call";a:1:{i:0;s:20:"dojox.gfx.shape.Line";}}s:7:"summary";s:26:"a line shape (Silverlight)";s:9:"classlike";b:1;}s:23:"dojox.gfx.Line.setShape";a:6:{s:9:"prototype";s:14:"dojox.gfx.Line";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:19:"a line shape object";}}s:6:"source";s:199:" this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.x1 = n.x1; r.y1 = n.y1; r.x2 = n.x2; r.y2 = n.y2;
return this; // self";s:7:"summary";s:38:"sets a line shape object (Silverlight)";s:7:"returns";s:4:"self";}s:20:"dojox.gfx.Line.shape";a:2:{s:8:"instance";s:14:"dojox.gfx.Line";s:7:"summary";s:0:"";}s:19:"dojox.gfx.Line.bbox";a:2:{s:8:"instance";s:14:"dojox.gfx.Line";s:7:"summary";s:0:"";}s:18:"dojox.gfx.Polyline";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:24:"dojox.gfx.shape.Polyline";}s:4:"call";a:1:{i:0;s:24:"dojox.gfx.shape.Polyline";}}s:7:"summary";s:38:"a polyline/polygon shape (Silverlight)";s:9:"classlike";b:1;}s:27:"dojox.gfx.Polyline.setShape";a:6:{s:9:"prototype";s:18:"dojox.gfx.Polyline";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"points";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:31:"a polyline/polygon shape object";}s:6:"closed";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:600:" if(points && points instanceof Array){
// branch
// points: Array: an array of points
this.shape = dojox.gfx.makeParameters(this.shape, {points: points});
if(closed && this.shape.points.length){
this.shape.points.push(this.shape.points[0]);
}
}else{
this.shape = dojox.gfx.makeParameters(this.shape, points);
}
this.box = null;
var p = this.shape.points, rp = [];
for(var i = 0; i < p.length; ++i){
if(typeof p[i] == "number"){
rp.push(p[i], p[++i]);
}else{
rp.push(p[i].x, p[i].y);
}
}
this.rawNode.points = rp.join(",");
return this; // self";s:7:"summary";s:50:"sets a polyline/polygon shape object (Silverlight)";s:7:"returns";s:4:"self";}s:24:"dojox.gfx.Polyline.shape";a:2:{s:8:"instance";s:18:"dojox.gfx.Polyline";s:7:"summary";s:0:"";}s:22:"dojox.gfx.Polyline.box";a:2:{s:8:"instance";s:18:"dojox.gfx.Polyline";s:7:"summary";s:0:"";}s:33:"dojox.gfx.Polyline.rawNode.points";a:2:{s:8:"instance";s:18:"dojox.gfx.Polyline";s:7:"summary";s:0:"";}s:15:"dojox.gfx.Image";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:21:"dojox.gfx.shape.Image";}s:4:"call";a:1:{i:0;s:21:"dojox.gfx.shape.Image";}}s:7:"summary";s:22:"an image (Silverlight)";s:9:"classlike";b:1;}s:24:"dojox.gfx.Image.setShape";a:6:{s:9:"prototype";s:15:"dojox.gfx.Image";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:21:"an image shape object";}}s:6:"source";s:228:" this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = n.width;
r.height = n.height;
r.source = n.src;
return this._applyTransform(); // self";s:7:"summary";s:40:"sets an image shape object (Silverlight)";s:7:"returns";s:4:"self";}s:34:"dojox.gfx.Image._getAdjustedMatrix";a:6:{s:9:"prototype";s:15:"dojox.gfx.Image";s:4:"type";s:8:"Function";s:6:"source";s:133:" var m = this.matrix, s = this.shape, d = {dx: s.x, dy: s.y};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D";s:7:"summary";s:61:"returns the adjusted ("real") transformation matrix";s:7:"returns";s:18:"dojox.gfx.Matrix2D";s:7:"private";b:1;}s:26:"dojox.gfx.Image.setRawNode";a:5:{s:9:"prototype";s:15:"dojox.gfx.Image";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"rawNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:25:" this.rawNode = rawNode;";s:7:"summary";s:158:"assigns and clears the underlying node that will represent this
shape. Once set, transforms, gradients, etc, can be applied.
(no fill & stroke by default)";}s:21:"dojox.gfx.Image.shape";a:2:{s:8:"instance";s:15:"dojox.gfx.Image";s:7:"summary";s:0:"";}s:20:"dojox.gfx.Image.bbox";a:2:{s:8:"instance";s:15:"dojox.gfx.Image";s:7:"summary";s:0:"";}s:23:"dojox.gfx.Image.rawNode";a:2:{s:8:"instance";s:15:"dojox.gfx.Image";s:7:"summary";s:0:"";}s:14:"dojox.gfx.Text";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:20:"dojox.gfx.shape.Text";}s:4:"call";a:1:{i:0;s:20:"dojox.gfx.shape.Text";}}s:7:"summary";s:30:"an anchored text (Silverlight)";s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:26:"dojox.gfx.silverlight.Font";}}s:9:"classlike";b:1;}s:23:"dojox.gfx.Text.setShape";a:6:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:19:"a text shape object";}}s:6:"source";s:398:" this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, s = this.shape;
r.text = s.text;
r.textDecorations = s.decoration === "underline" ? "Underline" : "None";
r["Canvas.Left"] = -10000;
r["Canvas.Top"] = -10000;
if(!this._delay){
this._delay = window.setTimeout(dojo.hitch(this, "_delayAlignment"), 10);
}
return this; // self";s:7:"summary";s:38:"sets a text shape object (Silverlight)";s:7:"returns";s:4:"self";}s:30:"dojox.gfx.Text._delayAlignment";a:6:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:6:"source";s:12946:"dojo.provide("dojox.gfx.silverlight");
dojo.require("dojox.gfx._base");
dojo.require("dojox.gfx.shape");
dojo.require("dojox.gfx.path");
dojo.experimental("dojox.gfx.silverlight");
dojox.gfx.silverlight.dasharray = {
solid: "none",
shortdash: [4, 1],
shortdot: [1, 1],
shortdashdot: [4, 1, 1, 1],
shortdashdotdot: [4, 1, 1, 1, 1, 1],
dot: [1, 3],
dash: [4, 3],
longdash: [8, 3],
dashdot: [4, 3, 1, 3],
longdashdot: [8, 3, 1, 3],
longdashdotdot: [8, 3, 1, 3, 1, 3]
};
dojox.gfx.silverlight.fontweight = {
normal: 400,
bold: 700
};
dojox.gfx.silverlight.caps = {butt: "Flat", round: "Round", square: "Square"};
dojox.gfx.silverlight.joins = {bevel: "Bevel", round: "Round"};
dojox.gfx.silverlight.fonts = {
serif: "Times New Roman",
times: "Times New Roman",
"sans-serif": "Arial",
helvetica: "Arial",
monotone: "Courier New",
courier: "Courier New"
};
dojox.gfx.silverlight.hexColor = function(/*String|Array|dojo.Color*/ color){
// summary: converts a color object to a Silverlight hex color string (#aarrggbb)
var c = dojox.gfx.normalizeColor(color),
t = c.toHex(), a = Math.round(c.a * 255);
a = (a < 0 ? 0 : a > 255 ? 255 : a).toString(16);
return "#" + (a.length < 2 ? "0" + a : a) + t.slice(1); // String
};
dojo.extend(dojox.gfx.Shape, {
// summary: Silverlight-specific implementation of dojox.gfx.Shape methods
setFill: function(fill){
// summary: sets a fill object (Silverlight)
// fill: Object: a fill object
// (see dojox.gfx.defaultLinearGradient,
// dojox.gfx.defaultRadialGradient,
// dojox.gfx.defaultPattern,
// or dojo.Color)
var p = this.rawNode.getHost().content, r = this.rawNode, f;
if(!fill){
// don't fill
this.fillStyle = null;
this._setFillAttr(null);
return this; // self
}
if(typeof(fill) == "object" && "type" in fill){
// gradient
switch(fill.type){
case "linear":
this.fillStyle = f = dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient, fill);
var lgb = p.createFromXaml("");
lgb.mappingMode = "Absolute";
lgb.startPoint = f.x1 + "," + f.y1;
lgb.endPoint = f.x2 + "," + f.y2;
dojo.forEach(f.colors, function(c){
var t = p.createFromXaml("");
t.offset = c.offset;
t.color = dojox.gfx.silverlight.hexColor(c.color);
lgb.gradientStops.add(t);
});
this._setFillAttr(lgb);
break;
case "radial":
this.fillStyle = f = dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient, fill);
var rgb = p.createFromXaml(""),
c = dojox.gfx.matrix.multiplyPoint(
dojox.gfx.matrix.invert(this._getAdjustedMatrix()), f.cx, f.cy),
pt = c.x + "," + c.y;
rgb.mappingMode = "Absolute";
rgb.gradientOrigin = pt;
rgb.center = pt;
rgb.radiusX = rgb.radiusY = f.r;
dojo.forEach(f.colors, function(c){
var t = p.createFromXaml("");
t.offset = c.offset;
t.color = dojox.gfx.silverlight.hexColor(c.color);
rgb.gradientStops.add(t);
});
this._setFillAttr(rgb);
break;
case "pattern":
// don't fill: Silverlight doesn't define TileBrush for some reason
this.fillStyle = null;
this._setFillAttr(null);
break;
}
return this; // self
}
// color object
this.fillStyle = f = dojox.gfx.normalizeColor(fill);
var scb = p.createFromXaml("");
scb.color = f.toHex();
scb.opacity = f.a;
this._setFillAttr(scb);
return this; // self
},
_setFillAttr: function(f){
this.rawNode.fill = f;
},
setStroke: function(stroke){
// summary: sets a stroke object (Silverlight)
// stroke: Object: a stroke object
// (see dojox.gfx.defaultStroke)
var p = this.rawNode.getHost().content, r = this.rawNode;
if(!stroke){
// don't stroke
this.strokeStyle = null;
r.stroke = null;
return this;
}
// normalize the stroke
if(typeof stroke == "string" || dojo.isArray(stroke) || stroke instanceof dojo.Color){
stroke = {color: stroke};
}
var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
s.color = dojox.gfx.normalizeColor(s.color);
// generate attributes
if(s){
var scb = p.createFromXaml("");
scb.color = s.color.toHex();
scb.opacity = s.color.a;
r.stroke = scb;
r.strokeThickness = s.width;
r.strokeStartLineCap = r.strokeEndLineCap = r.strokeDashCap =
dojox.gfx.silverlight.caps[s.cap];
if(typeof s.join == "number"){
r.strokeLineJoin = "Miter";
r.strokeMiterLimit = s.join;
}else{
r.strokeLineJoin = dojox.gfx.silverlight.joins[s.join];
}
var da = s.style.toLowerCase();
if(da in dojox.gfx.silverlight.dasharray){ da = dojox.gfx.silverlight.dasharray[da]; }
if(da instanceof Array){
da = dojo.clone(da);
/*
for(var i = 0; i < da.length; ++i){
da[i] *= s.width;
}
*/
if(s.cap != "butt"){
for(var i = 0; i < da.length; i += 2){
//da[i] -= s.width;
--da[i]
if(da[i] < 1){ da[i] = 1; }
}
for(var i = 1; i < da.length; i += 2){
//da[i] += s.width;
++da[i];
}
}
r.strokeDashArray = da.join(",");
}else{
r.strokeDashArray = null;
}
}
return this; // self
},
_getParentSurface: function(){
var surface = this.parent;
for(; surface && !(surface instanceof dojox.gfx.Surface); surface = surface.parent);
return surface;
},
_applyTransform: function() {
var tm = this._getAdjustedMatrix(), r = this.rawNode;
if(tm){
var p = this.rawNode.getHost().content,
m = p.createFromXaml(""),
mm = p.createFromXaml("");
mm.m11 = tm.xx;
mm.m21 = tm.xy;
mm.m12 = tm.yx;
mm.m22 = tm.yy;
mm.offsetX = tm.dx;
mm.offsetY = tm.dy;
m.matrix = mm;
r.renderTransform = m;
}else{
r.renderTransform = null;
}
return this;
},
setRawNode: function(rawNode){
// summary:
// assigns and clears the underlying node that will represent this
// shape. Once set, transforms, gradients, etc, can be applied.
// (no fill & stroke by default)
rawNode.fill = null;
rawNode.stroke = null;
this.rawNode = rawNode;
},
// move family
_moveToFront: function(){
// summary: moves a shape to front of its parent's list of shapes (Silverlight)
var c = this.parent.rawNode.children, r = this.rawNode;
c.remove(r);
c.add(r);
return this; // self
},
_moveToBack: function(){
// summary: moves a shape to back of its parent's list of shapes (Silverlight)
var c = this.parent.rawNode.children, r = this.rawNode;
c.remove(r);
c.insert(0, r);
return this; // self
},
_getAdjustedMatrix: function(){
// summary: returns the adjusted ("real") transformation matrix
return this.matrix; // dojox.gfx.Matrix2D
}
});
dojo.declare("dojox.gfx.Group", dojox.gfx.Shape, {
// summary: a group shape (Silverlight), which can be used
// to logically group shapes (e.g, to propagate matricies)
constructor: function(){
dojox.gfx.silverlight.Container._init.call(this);
},
setRawNode: function(rawNode){
// summary: sets a raw Silverlight node to be used by this shape
// rawNode: Node: an Silverlight node
this.rawNode = rawNode;
}
});
dojox.gfx.Group.nodeType = "Canvas";
dojo.declare("dojox.gfx.Rect", dojox.gfx.shape.Rect, {
// summary: a rectangle shape (Silverlight)
setShape: function(newShape){
// summary: sets a rectangle shape object (Silverlight)
// newShape: Object: a rectangle shape object
this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = n.width;
r.height = n.height;
r.radiusX = r.radiusY = n.r;
return this._applyTransform(); // self
},
_getAdjustedMatrix: function(){
// summary: returns the adjusted ("real") transformation matrix
var m = this.matrix, s = this.shape, d = {dx: s.x, dy: s.y};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D
}
});
dojox.gfx.Rect.nodeType = "Rectangle";
dojo.declare("dojox.gfx.Ellipse", dojox.gfx.shape.Ellipse, {
// summary: an ellipse shape (Silverlight)
setShape: function(newShape){
// summary: sets an ellipse shape object (Silverlight)
// newShape: Object: an ellipse shape object
this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = 2 * n.rx;
r.height = 2 * n.ry;
return this._applyTransform(); // self
},
_getAdjustedMatrix: function(){
// summary: returns the adjusted ("real") transformation matrix
var m = this.matrix, s = this.shape, d = {dx: s.cx - s.rx, dy: s.cy - s.ry};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D
}
});
dojox.gfx.Ellipse.nodeType = "Ellipse";
dojo.declare("dojox.gfx.Circle", dojox.gfx.shape.Circle, {
// summary: a circle shape (Silverlight)
setShape: function(newShape){
// summary: sets a circle shape object (Silverlight)
// newShape: Object: a circle shape object
this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = r.height = 2 * n.r;
return this._applyTransform(); // self
},
_getAdjustedMatrix: function(){
// summary: returns the adjusted ("real") transformation matrix
var m = this.matrix, s = this.shape, d = {dx: s.cx - s.r, dy: s.cy - s.r};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D
}
});
dojox.gfx.Circle.nodeType = "Ellipse";
dojo.declare("dojox.gfx.Line", dojox.gfx.shape.Line, {
// summary: a line shape (Silverlight)
setShape: function(newShape){
// summary: sets a line shape object (Silverlight)
// newShape: Object: a line shape object
this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.x1 = n.x1; r.y1 = n.y1; r.x2 = n.x2; r.y2 = n.y2;
return this; // self
}
});
dojox.gfx.Line.nodeType = "Line";
dojo.declare("dojox.gfx.Polyline", dojox.gfx.shape.Polyline, {
// summary: a polyline/polygon shape (Silverlight)
setShape: function(points, closed){
// summary: sets a polyline/polygon shape object (Silverlight)
// points: Object: a polyline/polygon shape object
if(points && points instanceof Array){
// branch
// points: Array: an array of points
this.shape = dojox.gfx.makeParameters(this.shape, {points: points});
if(closed && this.shape.points.length){
this.shape.points.push(this.shape.points[0]);
}
}else{
this.shape = dojox.gfx.makeParameters(this.shape, points);
}
this.box = null;
var p = this.shape.points, rp = [];
for(var i = 0; i < p.length; ++i){
if(typeof p[i] == "number"){
rp.push(p[i], p[++i]);
}else{
rp.push(p[i].x, p[i].y);
}
}
this.rawNode.points = rp.join(",");
return this; // self
}
});
dojox.gfx.Polyline.nodeType = "Polyline";
dojo.declare("dojox.gfx.Image", dojox.gfx.shape.Image, {
// summary: an image (Silverlight)
setShape: function(newShape){
// summary: sets an image shape object (Silverlight)
// newShape: Object: an image shape object
this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, n = this.shape;
r.width = n.width;
r.height = n.height;
r.source = n.src;
return this._applyTransform(); // self
},
_getAdjustedMatrix: function(){
// summary: returns the adjusted ("real") transformation matrix
var m = this.matrix, s = this.shape, d = {dx: s.x, dy: s.y};
return new dojox.gfx.Matrix2D(m ? [m, d] : d); // dojox.gfx.Matrix2D
},
setRawNode: function(rawNode){
// summary:
// assigns and clears the underlying node that will represent this
// shape. Once set, transforms, gradients, etc, can be applied.
// (no fill & stroke by default)
this.rawNode = rawNode;
}
});
dojox.gfx.Image.nodeType = "Image";
dojo.declare("dojox.gfx.Text", dojox.gfx.shape.Text, {
// summary: an anchored text (Silverlight)
setShape: function(newShape){
// summary: sets a text shape object (Silverlight)
// newShape: Object: a text shape object
this.shape = dojox.gfx.makeParameters(this.shape, newShape);
this.bbox = null;
var r = this.rawNode, s = this.shape;
r.text = s.text;
r.textDecorations = s.decoration === "underline" ? "Underline" : "None";
r["Canvas.Left"] = -10000;
r["Canvas.Top"] = -10000;
if(!this._delay){
this._delay = window.setTimeout(dojo.hitch(this, "_delayAlignment"), 10);
}
return this; // self
},
_delayAlignment: function(){
// handle alignment
var r = this.rawNode, s = this.shape,
w = r.actualWidth, h = r.actualHeight, x = s.x, y = s.y - h * 0.75;
switch(s.align){
case "middle":
x -= w / 2;
break;
case "end":
x -= w;
break;
}
this._delta = {dx: x, dy: y};
r["Canvas.Left"] = 0;
r["Canvas.Top"] = 0;
this._applyTransform();
delete this._delay;";s:7:"returns";s:30:"String|self|dojox.gfx.Matrix2D";s:7:"private";b:1;s:7:"summary";s:0:"";}s:33:"dojox.gfx.Text._getAdjustedMatrix";a:5:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:6:"source";s:142:" var m = this.matrix, d = this._delta, x;
if(m){
x = d ? [m, d] : m;
}else{
x = d ? d : {};
}
return new dojox.gfx.Matrix2D(x);";s:7:"summary";s:61:"returns the adjusted ("real") transformation matrix";s:7:"private";b:1;}s:24:"dojox.gfx.Text.setStroke";a:5:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:6:"source";s:22:" return this; // self";s:7:"summary";s:29:"ignore setting a stroke style";s:7:"returns";s:4:"self";}s:27:"dojox.gfx.Text._setFillAttr";a:6:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"f";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:30:" this.rawNode.foreground = f;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:25:"dojox.gfx.Text.setRawNode";a:5:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"rawNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:25:" this.rawNode = rawNode;";s:7:"summary";s:158:"assigns and clears the underlying node that will represent this
shape. Once set, transforms, gradients, etc, can be applied.
(no fill & stroke by default)";}s:27:"dojox.gfx.Text.getTextWidth";a:4:{s:9:"prototype";s:14:"dojox.gfx.Text";s:4:"type";s:8:"Function";s:6:"source";s:34:" return this.rawNode.actualWidth;";s:7:"summary";s:28:"get the text width in pixels";}s:20:"dojox.gfx.Text.shape";a:2:{s:8:"instance";s:14:"dojox.gfx.Text";s:7:"summary";s:0:"";}s:19:"dojox.gfx.Text.bbox";a:2:{s:8:"instance";s:14:"dojox.gfx.Text";s:7:"summary";s:0:"";}s:21:"dojox.gfx.Text._delay";a:3:{s:8:"instance";s:14:"dojox.gfx.Text";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"dojox.gfx.Text._delta";a:3:{s:8:"instance";s:14:"dojox.gfx.Text";s:7:"private";b:1;s:7:"summary";s:0:"";}s:33:"dojox.gfx.Text.rawNode.foreground";a:2:{s:8:"instance";s:14:"dojox.gfx.Text";s:7:"summary";s:0:"";}s:22:"dojox.gfx.Text.rawNode";a:2:{s:8:"instance";s:14:"dojox.gfx.Text";s:7:"summary";s:0:"";}s:14:"dojox.gfx.Path";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:19:"dojox.gfx.path.Path";}s:4:"call";a:1:{i:0;s:19:"dojox.gfx.path.Path";}}s:7:"summary";s:26:"a path shape (Silverlight)";s:9:"classlike";b:1;}s:33:"dojox.gfx.Path._updateWithSegment";a:7:{s:9:"prototype";s:14:"dojox.gfx.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"segment";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:9:"a segment";}}s:6:"source";s:167:" dojox.gfx.Path.superclass._updateWithSegment.apply(this, arguments);
var p = this.shape.path;
if(typeof(p) == "string"){
this.rawNode.data = p ? p : null;
}";s:7:"summary";s:49:"updates the bounding box of path with new segment";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:44:"dojox.gfx.Path.superclass._updateWithSegment";}}s:7:"private";b:1;}s:23:"dojox.gfx.Path.setShape";a:7:{s:9:"prototype";s:14:"dojox.gfx.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:63:"an SVG path string or a path object (see dojox.gfx.defaultPath)";}}s:6:"source";s:146:" dojox.gfx.Path.superclass.setShape.apply(this, arguments);
var p = this.shape.path;
this.rawNode.data = p ? p : null;
return this; // self";s:7:"summary";s:40:"forms a path using a shape (Silverlight)";s:7:"returns";s:4:"self";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:34:"dojox.gfx.Path.superclass.setShape";}}}s:27:"dojox.gfx.Path.rawNode.data";a:2:{s:8:"instance";s:14:"dojox.gfx.Path";s:7:"summary";s:0:"";}s:18:"dojox.gfx.TextPath";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:23:"dojox.gfx.path.TextPath";}s:4:"call";a:1:{i:0;s:23:"dojox.gfx.path.TextPath";}}s:7:"summary";s:30:"a textpath shape (Silverlight)";s:9:"classlike";b:1;}s:37:"dojox.gfx.TextPath._updateWithSegment";a:6:{s:9:"prototype";s:18:"dojox.gfx.TextPath";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"segment";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:9:"a segment";}}s:6:"source";s:95:" // summary: updates the bounding box of path with new segment
// segment: Object: a segment";s:7:"summary";s:49:"updates the bounding box of path with new segment";s:7:"private";b:1;}s:27:"dojox.gfx.TextPath.setShape";a:5:{s:9:"prototype";s:18:"dojox.gfx.TextPath";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"newShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:63:"an SVG path string or a path object (see dojox.gfx.defaultPath)";}}s:6:"source";s:141:" // summary: forms a path using a shape (Silverlight)
// newShape: Object: an SVG path string or a path object (see dojox.gfx.defaultPath)";s:7:"summary";s:40:"forms a path using a shape (Silverlight)";}s:27:"dojox.gfx.TextPath._setText";a:5:{s:9:"prototype";s:18:"dojox.gfx.TextPath";s:4:"type";s:8:"Function";s:6:"source";s:0:"";s:7:"private";b:1;s:7:"summary";s:0:"";}s:17:"dojox.gfx.Surface";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:23:"dojox.gfx.shape.Surface";}s:4:"call";a:2:{i:0;s:23:"dojox.gfx.shape.Surface";i:1;s:37:"dojox.gfx.silverlight.Container._init";}}s:7:"summary";s:54:"a surface object to be used for drawings (Silverlight)";s:6:"source";s:51:" dojox.gfx.silverlight.Container._init.call(this);";s:6:"mixins";a:1:{s:9:"prototype";a:3:{i:0;s:31:"dojox.gfx.silverlight.Container";i:1;s:23:"dojox.gfx.shape.Creator";i:2;s:16:"eventsProcessing";}}s:9:"classlike";b:1;}s:25:"dojox.gfx.Surface.destroy";a:4:{s:9:"prototype";s:17:"dojox.gfx.Surface";s:4:"type";s:8:"Function";s:6:"source";s:149:" window[this._onLoadName] = dojox.gfx.silverlight.nullFunc;
delete dojox.gfx.silverlight.surfaces[this.rawNode.name];
this.inherited(arguments);";s:7:"summary";s:0:"";}s:31:"dojox.gfx.Surface.setDimensions";a:6:{s:9:"prototype";s:17:"dojox.gfx.Surface";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"width";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:41:"width of surface, e.g., "100px"";}s:6:"height";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:42:"height of surface, e.g., "100px"";}}s:6:"source";s:256:" this.width = dojox.gfx.normalizedLength(width); // in pixels
this.height = dojox.gfx.normalizedLength(height); // in pixels
var p = this.rawNode && this.rawNode.getHost();
if(p){
p.width = width;
p.height = height;
}
return this; // self";s:7:"summary";s:40:"sets the width and height of the rawNode";s:7:"returns";s:4:"self";}s:31:"dojox.gfx.Surface.getDimensions";a:5:{s:9:"prototype";s:17:"dojox.gfx.Surface";s:4:"type";s:8:"Function";s:6:"source";s:249:" var p = this.rawNode && this.rawNode.getHost();
var t = p ? {width: p.content.actualWidth, height: p.content.actualHeight} : null;
if(t.width <= 0){ t.width = this.width; }
if(t.height <= 0){ t.height = this.height; }
return t; // Object";s:7:"summary";s:74:"returns an object with properties "width" and "height"";s:7:"returns";s:6:"Object";}s:23:"dojox.gfx.Surface.width";a:2:{s:8:"instance";s:17:"dojox.gfx.Surface";s:7:"summary";s:0:"";}s:24:"dojox.gfx.Surface.height";a:2:{s:8:"instance";s:17:"dojox.gfx.Surface";s:7:"summary";s:0:"";}s:37:"dojox.gfx.Surface.setDimensions.width";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:41:"width of surface, e.g., "100px"";}s:38:"dojox.gfx.Surface.setDimensions.height";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:42:"height of surface, e.g., "100px"";}s:31:"dojox.gfx.silverlight.dasharray";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:37:"dojox.gfx.silverlight.dasharray.solid";a:1:{s:7:"summary";s:0:"";}s:41:"dojox.gfx.silverlight.dasharray.shortdash";a:1:{s:7:"summary";s:0:"";}s:40:"dojox.gfx.silverlight.dasharray.shortdot";a:1:{s:7:"summary";s:0:"";}s:44:"dojox.gfx.silverlight.dasharray.shortdashdot";a:1:{s:7:"summary";s:0:"";}s:47:"dojox.gfx.silverlight.dasharray.shortdashdotdot";a:1:{s:7:"summary";s:0:"";}s:35:"dojox.gfx.silverlight.dasharray.dot";a:1:{s:7:"summary";s:0:"";}s:36:"dojox.gfx.silverlight.dasharray.dash";a:1:{s:7:"summary";s:0:"";}s:40:"dojox.gfx.silverlight.dasharray.longdash";a:1:{s:7:"summary";s:0:"";}s:39:"dojox.gfx.silverlight.dasharray.dashdot";a:1:{s:7:"summary";s:0:"";}s:43:"dojox.gfx.silverlight.dasharray.longdashdot";a:1:{s:7:"summary";s:0:"";}s:46:"dojox.gfx.silverlight.dasharray.longdashdotdot";a:1:{s:7:"summary";s:0:"";}s:32:"dojox.gfx.silverlight.fontweight";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:39:"dojox.gfx.silverlight.fontweight.normal";a:1:{s:7:"summary";s:0:"";}s:37:"dojox.gfx.silverlight.fontweight.bold";a:1:{s:7:"summary";s:0:"";}s:26:"dojox.gfx.silverlight.caps";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:31:"dojox.gfx.silverlight.caps.butt";a:1:{s:7:"summary";s:0:"";}s:32:"dojox.gfx.silverlight.caps.round";a:1:{s:7:"summary";s:0:"";}s:33:"dojox.gfx.silverlight.caps.square";a:1:{s:7:"summary";s:0:"";}s:27:"dojox.gfx.silverlight.joins";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:33:"dojox.gfx.silverlight.joins.bevel";a:1:{s:7:"summary";s:0:"";}s:33:"dojox.gfx.silverlight.joins.round";a:1:{s:7:"summary";s:0:"";}s:27:"dojox.gfx.silverlight.fonts";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:33:"dojox.gfx.silverlight.fonts.serif";a:1:{s:7:"summary";s:0:"";}s:33:"dojox.gfx.silverlight.fonts.times";a:1:{s:7:"summary";s:0:"";}s:38:"dojox.gfx.silverlight.fonts.sans-serif";a:1:{s:7:"summary";s:0:"";}s:37:"dojox.gfx.silverlight.fonts.helvetica";a:1:{s:7:"summary";s:0:"";}s:36:"dojox.gfx.silverlight.fonts.monotone";a:1:{s:7:"summary";s:0:"";}s:35:"dojox.gfx.silverlight.fonts.courier";a:1:{s:7:"summary";s:0:"";}s:30:"dojox.gfx.silverlight.surfaces";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:26:"dojox.gfx.silverlight.Font";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:35:"dojox.gfx.silverlight.Font._setFont";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:493:" var f = this.fontStyle, r = this.rawNode,
fw = dojox.gfx.silverlight.fontweight,
fo = dojox.gfx.silverlight.fonts, t = f.family.toLowerCase();
r.fontStyle = f.style == "italic" ? "Italic" : "Normal";
r.fontWeight = f.weight in fw ? fw[f.weight] : f.weight;
r.fontSize = dojox.gfx.normalizedLength(f.size);
r.fontFamily = t in fo ? fo[t] : f.family;
// update the transform
if(!this._delay){
this._delay = window.setTimeout(dojo.hitch(this, "_delayAlignment"), 10);
}";s:7:"summary";s:32:"sets a font object (Silverlight)";s:7:"private";b:1;}s:42:"dojox.gfx.silverlight.Font._setFont._delay";a:4:{s:8:"instance";s:35:"dojox.gfx.silverlight.Font._setFont";s:7:"private";b:1;s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:31:"dojox.gfx.silverlight.Container";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:37:"dojox.gfx.silverlight.Container._init";a:5:{s:4:"type";s:8:"Function";s:6:"source";s:45:" dojox.gfx.shape.Container._init.call(this);";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:31:"dojox.gfx.shape.Container._init";}}s:7:"private";b:1;s:7:"summary";s:0:"";}s:35:"dojox.gfx.silverlight.Container.add";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"shape";a:2:{s:4:"type";s:15:"dojox.gfx.Shape";s:7:"summary";s:26:"a Silverlight shape object";}}s:6:"source";s:253:" if(this != shape.getParent()){
//dojox.gfx.Group.superclass.add.apply(this, arguments);
//this.inherited(arguments);
dojox.gfx.shape.Container.add.apply(this, arguments);
this.rawNode.children.add(shape.rawNode);
}
return this; // self";s:7:"summary";s:31:"adds a shape to a group/surface";s:7:"returns";s:4:"self";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:29:"dojox.gfx.shape.Container.add";}}}s:38:"dojox.gfx.silverlight.Container.remove";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"shape";a:2:{s:4:"type";s:15:"dojox.gfx.Shape";s:7:"summary";s:26:"a Silverlight shape object";}s:8:"silently";a:3:{s:4:"type";s:7:"Boolean";s:8:"optional";b:1;s:7:"summary";s:29:"if true, regenerate a picture";}}s:6:"source";s:320:" if(this == shape.getParent()){
var parent = shape.rawNode.getParent();
if(parent){
parent.children.remove(shape.rawNode);
}
//dojox.gfx.Group.superclass.remove.apply(this, arguments);
//this.inherited(arguments);
dojox.gfx.shape.Container.remove.apply(this, arguments);
}
return this; // self";s:7:"summary";s:35:"remove a shape from a group/surface";s:7:"returns";s:4:"self";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:32:"dojox.gfx.shape.Container.remove";}}}s:37:"dojox.gfx.silverlight.Container.clear";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:143:" this.rawNode.children.clear();
//return this.inherited(arguments); // self
return dojox.gfx.shape.Container.clear.apply(this, arguments);";s:7:"summary";s:39:"removes all shapes from a group/surface";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:31:"dojox.gfx.shape.Container.clear";}}}s:49:"dojox.gfx.silverlight.Container._moveChildToFront";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:48:"dojox.gfx.silverlight.Container._moveChildToBack";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:30:"dojox.gfx.silverlight.hexColor";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"color";a:1:{s:4:"type";s:23:"String|Array|dojo.Color";}}s:6:"source";s:203:" var c = dojox.gfx.normalizeColor(color),
t = c.toHex(), a = Math.round(c.a * 255);
a = (a < 0 ? 0 : a > 255 ? 255 : a).toString(16);
return "#" + (a.length < 2 ? "0" + a : a) + t.slice(1); // String";s:7:"summary";s:69:"converts a color object to a Silverlight hex color string (#aarrggbb)";s:7:"returns";s:6:"String";}s:30:"dojox.gfx.silverlight.nullFunc";a:3:{s:4:"type";s:8:"Function";s:6:"source";s:3:"} ";s:7:"summary";s:0:"";}s:23:"dojox.gfx.createSurface";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:10:"parentNode";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:13:"a parent node";}s:5:"width";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:41:"width of surface, e.g., "100px"";}s:6:"height";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:42:"height of surface, e.g., "100px"";}}s:6:"source";s:2450:" var s = new dojox.gfx.Surface();
parentNode = dojo.byId(parentNode);
s._parent = parentNode;
// create an empty canvas
var t = parentNode.ownerDocument.createElement("script");
t.type = "text/xaml";
t.id = dojox.gfx._base._getUniqueId();
t.text = "";
parentNode.parentNode.insertBefore(t, parentNode);
s._nodes.push(t);
// build the object
var obj, pluginName = dojox.gfx._base._getUniqueId(),
onLoadName = "__" + dojox.gfx._base._getUniqueId() + "_onLoad";
s._onLoadName = onLoadName;
window[onLoadName] = function(sender){
console.log("Silverlight: loaded");
if(!s.rawNode){
s.rawNode = dojo.byId(pluginName).content.root;
// register the plugin with its parent node
dojox.gfx.silverlight.surfaces[s.rawNode.name] = parentNode;
s.onLoad(s);
console.log("Silverlight: assigned");
}
};
if(dojo.isSafari){
obj = "";
}else{
obj = "";
}
parentNode.innerHTML = obj;
var pluginNode = dojo.byId(pluginName);
if(pluginNode.content && pluginNode.content.root){
// the plugin was created synchronously
s.rawNode = pluginNode.content.root;
// register the plugin with its parent node
dojox.gfx.silverlight.surfaces[s.rawNode.name] = parentNode;
}else{
// the plugin is being created asynchronously
s.rawNode = null;
s.isLoaded = false;
}
s._nodes.push(pluginNode);
s.width = dojox.gfx.normalizedLength(width); // in pixels
s.height = dojox.gfx.normalizedLength(height); // in pixels
return s; // dojox.gfx.Surface";s:7:"summary";s:31:"creates a surface (Silverlight)";s:7:"returns";s:17:"dojox.gfx.Surface";}s:22:"__dojoSilverlightError";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"sender";a:1:{s:4:"type";s:0:"";}s:3:"err";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:560:" var t = "Silverlight Error:\n" +
"Code: " + err.ErrorCode + "\n" +
"Type: " + err.ErrorType + "\n" +
"Message: " + err.ErrorMessage + "\n";
switch(err.ErrorType){
case "ParserError":
t += "XamlFile: " + err.xamlFile + "\n" +
"Line: " + err.lineNumber + "\n" +
"Position: " + err.charPosition + "\n";
break;
case "RuntimeError":
t += "MethodName: " + err.methodName + "\n";
if(err.lineNumber != 0){
t +=
"Line: " + err.lineNumber + "\n" +
"Position: " + err.charPosition + "\n";
}
break;
}
console.error(t);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:22:"dojox.gfx.equalSources";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"a";a:1:{s:4:"type";s:0:"";}s:1:"b";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:31:" return a && b && a.equals(b);";s:7:"summary";s:0:"";}s:23:"dojox.gfx.Shape.setFill";a:6:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"fill";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:125:"a fill object
(see dojox.gfx.defaultLinearGradient,
dojox.gfx.defaultRadialGradient,
dojox.gfx.defaultPattern,
or dojo.Color)";}}s:6:"source";s:1914:" var p = this.rawNode.getHost().content, r = this.rawNode, f;
if(!fill){
// don't fill
this.fillStyle = null;
this._setFillAttr(null);
return this; // self
}
if(typeof(fill) == "object" && "type" in fill){
// gradient
switch(fill.type){
case "linear":
this.fillStyle = f = dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient, fill);
var lgb = p.createFromXaml("");
lgb.mappingMode = "Absolute";
lgb.startPoint = f.x1 + "," + f.y1;
lgb.endPoint = f.x2 + "," + f.y2;
dojo.forEach(f.colors, function(c){
var t = p.createFromXaml("");
t.offset = c.offset;
t.color = dojox.gfx.silverlight.hexColor(c.color);
lgb.gradientStops.add(t);
});
this._setFillAttr(lgb);
break;
case "radial":
this.fillStyle = f = dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient, fill);
var rgb = p.createFromXaml(""),
c = dojox.gfx.matrix.multiplyPoint(
dojox.gfx.matrix.invert(this._getAdjustedMatrix()), f.cx, f.cy),
pt = c.x + "," + c.y;
rgb.mappingMode = "Absolute";
rgb.gradientOrigin = pt;
rgb.center = pt;
rgb.radiusX = rgb.radiusY = f.r;
dojo.forEach(f.colors, function(c){
var t = p.createFromXaml("");
t.offset = c.offset;
t.color = dojox.gfx.silverlight.hexColor(c.color);
rgb.gradientStops.add(t);
});
this._setFillAttr(rgb);
break;
case "pattern":
// don't fill: Silverlight doesn't define TileBrush for some reason
this.fillStyle = null;
this._setFillAttr(null);
break;
}
return this; // self
}
// color object
this.fillStyle = f = dojox.gfx.normalizeColor(fill);
var scb = p.createFromXaml("");
scb.color = f.toHex();
scb.opacity = f.a;
this._setFillAttr(scb);
return this; // self";s:7:"summary";s:32:"sets a fill object (Silverlight)";s:7:"returns";s:4:"self";}s:25:"dojox.gfx.Shape.fillStyle";a:2:{s:8:"instance";s:15:"dojox.gfx.Shape";s:7:"summary";s:0:"";}s:28:"dojox.gfx.Shape._setFillAttr";a:6:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"f";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:24:" this.rawNode.fill = f;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.gfx.Shape.rawNode.fill";a:2:{s:8:"instance";s:15:"dojox.gfx.Shape";s:7:"summary";s:0:"";}s:25:"dojox.gfx.Shape.setStroke";a:6:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"stroke";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:45:"a stroke object
(see dojox.gfx.defaultStroke)";}}s:6:"source";s:1539:" var p = this.rawNode.getHost().content, r = this.rawNode;
if(!stroke){
// don't stroke
this.strokeStyle = null;
r.stroke = null;
return this;
}
// normalize the stroke
if(typeof stroke == "string" || dojo.isArray(stroke) || stroke instanceof dojo.Color){
stroke = {color: stroke};
}
var s = this.strokeStyle = dojox.gfx.makeParameters(dojox.gfx.defaultStroke, stroke);
s.color = dojox.gfx.normalizeColor(s.color);
// generate attributes
if(s){
var scb = p.createFromXaml("");
scb.color = s.color.toHex();
scb.opacity = s.color.a;
r.stroke = scb;
r.strokeThickness = s.width;
r.strokeStartLineCap = r.strokeEndLineCap = r.strokeDashCap =
dojox.gfx.silverlight.caps[s.cap];
if(typeof s.join == "number"){
r.strokeLineJoin = "Miter";
r.strokeMiterLimit = s.join;
}else{
r.strokeLineJoin = dojox.gfx.silverlight.joins[s.join];
}
var da = s.style.toLowerCase();
if(da in dojox.gfx.silverlight.dasharray){ da = dojox.gfx.silverlight.dasharray[da]; }
if(da instanceof Array){
da = dojo.clone(da);
/*
for(var i = 0; i < da.length; ++i){
da[i] *= s.width;
}
*/
if(s.cap != "butt"){
for(var i = 0; i < da.length; i += 2){
//da[i] -= s.width;
--da[i]
if(da[i] < 1){ da[i] = 1; }
}
for(var i = 1; i < da.length; i += 2){
//da[i] += s.width;
++da[i];
}
}
r.strokeDashArray = da.join(",");
}else{
r.strokeDashArray = null;
}
}
return this; // self";s:7:"summary";s:34:"sets a stroke object (Silverlight)";s:7:"returns";s:4:"self";}s:27:"dojox.gfx.Shape.strokeStyle";a:2:{s:8:"instance";s:15:"dojox.gfx.Shape";s:7:"summary";s:0:"";}s:33:"dojox.gfx.Shape._getParentSurface";a:5:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:6:"source";s:133:" var surface = this.parent;
for(; surface && !(surface instanceof dojox.gfx.Surface); surface = surface.parent);
return surface;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:31:"dojox.gfx.Shape._applyTransform";a:5:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:6:"source";s:419:" var tm = this._getAdjustedMatrix(), r = this.rawNode;
if(tm){
var p = this.rawNode.getHost().content,
m = p.createFromXaml(""),
mm = p.createFromXaml("");
mm.m11 = tm.xx;
mm.m21 = tm.xy;
mm.m12 = tm.yx;
mm.m22 = tm.yy;
mm.offsetX = tm.dx;
mm.offsetY = tm.dy;
m.matrix = mm;
r.renderTransform = m;
}else{
r.renderTransform = null;
}
return this;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dojox.gfx.Shape.setRawNode";a:5:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"rawNode";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:73:" rawNode.fill = null;
rawNode.stroke = null;
this.rawNode = rawNode;";s:7:"summary";s:158:"assigns and clears the underlying node that will represent this
shape. Once set, transforms, gradients, etc, can be applied.
(no fill & stroke by default)";}s:23:"dojox.gfx.Shape.rawNode";a:2:{s:8:"instance";s:15:"dojox.gfx.Shape";s:7:"summary";s:0:"";}s:28:"dojox.gfx.Shape._moveToFront";a:6:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:6:"source";s:107:" var c = this.parent.rawNode.children, r = this.rawNode;
c.remove(r);
c.add(r);
return this; // self";s:7:"summary";s:67:"moves a shape to front of its parent's list of shapes (Silverlight)";s:7:"returns";s:4:"self";s:7:"private";b:1;}s:27:"dojox.gfx.Shape._moveToBack";a:6:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:6:"source";s:113:" var c = this.parent.rawNode.children, r = this.rawNode;
c.remove(r);
c.insert(0, r);
return this; // self";s:7:"summary";s:66:"moves a shape to back of its parent's list of shapes (Silverlight)";s:7:"returns";s:4:"self";s:7:"private";b:1;}s:34:"dojox.gfx.Shape._getAdjustedMatrix";a:6:{s:9:"prototype";s:15:"dojox.gfx.Shape";s:4:"type";s:8:"Function";s:6:"source";s:43:" return this.matrix; // dojox.gfx.Matrix2D";s:7:"summary";s:61:"returns the adjusted ("real") transformation matrix";s:7:"returns";s:18:"dojox.gfx.Matrix2D";s:7:"private";b:1;}s:36:"dojox.gfx.shape.Creator.createObject";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:9:"shapeType";a:2:{s:4:"type";s:8:"Function";s:7:"summary";s:44:"a class constructor to create an instance of";}s:8:"rawShape";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:69:"properties to be passed in to the classes "setShape" method";}}s:6:"source";s:267:" if(!this.rawNode){ return null; }
var shape = new shapeType();
var node = this.rawNode.getHost().content.createFromXaml("<" + shapeType.nodeType + "/>");
shape.setRawNode(node);
shape.setShape(rawShape);
this.add(shape);
return shape; // dojox.gfx.Shape";s:7:"summary";s:49:"creates an instance of the passed shapeType class";s:7:"returns";s:15:"dojox.gfx.Shape";}s:15:"dojox.gfx.Shape";a:3:{s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:16:"eventsProcessing";}}s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:24:"dojox.gfx.Group.nodeType";a:1:{s:7:"summary";s:0:"";}s:23:"dojox.gfx.Rect.nodeType";a:1:{s:7:"summary";s:0:"";}s:26:"dojox.gfx.Ellipse.nodeType";a:1:{s:7:"summary";s:0:"";}s:25:"dojox.gfx.Circle.nodeType";a:1:{s:7:"summary";s:0:"";}s:23:"dojox.gfx.Line.nodeType";a:1:{s:7:"summary";s:0:"";}s:27:"dojox.gfx.Polyline.nodeType";a:1:{s:7:"summary";s:0:"";}s:24:"dojox.gfx.Image.nodeType";a:1:{s:7:"summary";s:0:"";}s:23:"dojox.gfx.Text.nodeType";a:1:{s:7:"summary";s:0:"";}s:23:"dojox.gfx.Path.nodeType";a:1:{s:7:"summary";s:0:"";}s:27:"dojox.gfx.TextPath.nodeType";a:1:{s:7:"summary";s:0:"";}s:21:"dojox.gfx.silverlight";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:9:"dojox.gfx";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}