a:59:{s:9:"#provides";s:14:"dojox.gfx.path";s:9:"#resource";s:11:"gfx/path.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.gfx.shape";}}s:19:"dojox.gfx.path.Path";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:1:{i:0;s:15:"dojox.gfx.Shape";}}s:7:"summary";s:18:"a path constructor";s:10:"parameters";a:1:{s:7:"rawNode";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:41:"a DOM node to be used by this path object";}}s:6:"source";s:139:" this.shape = dojo.clone(dojox.gfx.defaultPath); this.segments = []; this.absolute = true; this.last = {}; this.rawNode = rawNode;";s:9:"classlike";b:1;}s:35:"dojox.gfx.path.Path.setAbsoluteMode";a:6:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"mode";a:2:{s:4:"type";s:7:"Boolean";s:7:"summary";s:75:"true/false or "absolute"/"relative" to specify the mode";}}s:6:"source";s:95:" this.absolute = typeof mode == "string" ? (mode == "absolute") : mode; return this; // self";s:7:"summary";s:49:"sets an absolute or relative mode for path points";s:7:"returns";s:4:"self";}s:35:"dojox.gfx.path.Path.getAbsoluteMode";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:34:" return this.absolute; // Boolean";s:7:"summary";s:44:"returns a current value of the absolute mode";s:7:"returns";s:7:"Boolean";}s:34:"dojox.gfx.path.Path.getBoundingBox";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:177:" return (this.bbox && ("l" in this.bbox)) ? {x: this.bbox.l, y: this.bbox.t, width: this.bbox.r - this.bbox.l, height: this.bbox.b - this.bbox.t} : null; // dojox.gfx.Rectangle";s:7:"summary";s:54:"returns the bounding box {x, y, width, height} or null";s:7:"returns";s:19:"dojox.gfx.Rectangle";}s:35:"dojox.gfx.path.Path.getLastPosition";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:55:" return "x" in this.last ? this.last : null; // Object";s:7:"summary";s:43:"returns the last point in the path, or null";s:7:"returns";s:6:"Object";}s:31:"dojox.gfx.path.Path._updateBBox";a:7:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"x";a:2:{s:4:"type";s:6:"Number";s:7:"summary";s:15:"an x coordinate";}s:1:"y";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1783:"dojo.provide("dojox.gfx.path"); dojo.require("dojox.gfx.shape"); dojo.declare("dojox.gfx.path.Path", dojox.gfx.Shape, { // summary: a generalized path shape constructor: function(rawNode){ // summary: a path constructor // rawNode: Node: a DOM node to be used by this path object this.shape = dojo.clone(dojox.gfx.defaultPath); this.segments = []; this.absolute = true; this.last = {}; this.rawNode = rawNode; }, // mode manipulations setAbsoluteMode: function(mode){ // summary: sets an absolute or relative mode for path points // mode: Boolean: true/false or "absolute"/"relative" to specify the mode this.absolute = typeof mode == "string" ? (mode == "absolute") : mode; return this; // self }, getAbsoluteMode: function(){ // summary: returns a current value of the absolute mode return this.absolute; // Boolean }, getBoundingBox: function(){ // summary: returns the bounding box {x, y, width, height} or null return (this.bbox && ("l" in this.bbox)) ? {x: this.bbox.l, y: this.bbox.t, width: this.bbox.r - this.bbox.l, height: this.bbox.b - this.bbox.t} : null; // dojox.gfx.Rectangle }, getLastPosition: function(){ // summary: returns the last point in the path, or null return "x" in this.last ? this.last : null; // Object }, // segment interpretation _updateBBox: function(x, y){ // summary: updates the bounding box of path with new point // x: Number: an x coordinate // y: Number: a y coordinate // we use {l, b, r, t} representation of a bbox if(this.bbox && ("l" in this.bbox)){ if(this.bbox.l > x) this.bbox.l = x; if(this.bbox.r < x) this.bbox.r = x; if(this.bbox.t > y) this.bbox.t = y; if(this.bbox.b < y) this.bbox.b = y; }else{ this.bbox = {l: x, b: y, r: x, t: y}; }";s:7:"summary";s:47:"updates the bounding box of path with new point";s:7:"returns";s:39:"self|Boolean|dojox.gfx.Rectangle|Object";s:7:"private";b:1;}s:38:"dojox.gfx.path.Path._updateWithSegment";a:7:{s:9:"prototype";s:19:"dojox.gfx.path.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:2644:" var n = segment.args, l = n.length; // update internal variables: bbox, absolute, last switch(segment.action){ case "M": case "L": case "C": case "S": case "Q": case "T": for(var i = 0; i < l; i += 2){ this._updateBBox(n[i], n[i + 1]); } this.last.x = n[l - 2]; this.last.y = n[l - 1]; this.absolute = true; break; case "H": for(var i = 0; i < l; ++i){ this._updateBBox(n[i], this.last.y); } this.last.x = n[l - 1]; this.absolute = true; break; case "V": for(var i = 0; i < l; ++i){ this._updateBBox(this.last.x, n[i]); } this.last.y = n[l - 1]; this.absolute = true; break; case "m": var start = 0; if(!("x" in this.last)){ this._updateBBox(this.last.x = n[0], this.last.y = n[1]); start = 2; } for(var i = start; i < l; i += 2){ this._updateBBox(this.last.x += n[i], this.last.y += n[i + 1]); } this.absolute = false; break; case "l": case "t": for(var i = 0; i < l; i += 2){ this._updateBBox(this.last.x += n[i], this.last.y += n[i + 1]); } this.absolute = false; break; case "h": for(var i = 0; i < l; ++i){ this._updateBBox(this.last.x += n[i], this.last.y); } this.absolute = false; break; case "v": for(var i = 0; i < l; ++i){ this._updateBBox(this.last.x, this.last.y += n[i]); } this.absolute = false; break; case "c": for(var i = 0; i < l; i += 6){ this._updateBBox(this.last.x + n[i], this.last.y + n[i + 1]); this._updateBBox(this.last.x + n[i + 2], this.last.y + n[i + 3]); this._updateBBox(this.last.x += n[i + 4], this.last.y += n[i + 5]); } this.absolute = false; break; case "s": case "q": for(var i = 0; i < l; i += 4){ this._updateBBox(this.last.x + n[i], this.last.y + n[i + 1]); this._updateBBox(this.last.x += n[i + 2], this.last.y += n[i + 3]); } this.absolute = false; break; case "A": for(var i = 0; i < l; i += 7){ this._updateBBox(n[i + 5], n[i + 6]); } this.last.x = n[l - 2]; this.last.y = n[l - 1]; this.absolute = true; break; case "a": for(var i = 0; i < l; i += 7){ this._updateBBox(this.last.x += n[i + 5], this.last.y += n[i + 6]); } this.absolute = false; break; } // add an SVG path segment var path = [segment.action]; for(var i = 0; i < l; ++i){ path.push(dojox.gfx.formatNumber(n[i], true)); } if(typeof this.shape.path == "string"){ this.shape.path += path.join(""); }else{ Array.prototype.push.apply(this.shape.path, path); }";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:20:"Array.prototype.push";}}s:7:"private";b:1;}s:34:"dojox.gfx.path.Path._validSegments";a:4:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:32:"dojox.gfx.path.Path._pushSegment";a:6:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"action";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:35:"valid SVG code for a segment's type";}s:4:"args";a:2:{s:4:"type";s:5:"Array";s:7:"summary";s:37:"a list of parameters for this segment";}}s:6:"source";s:440:" var group = this._validSegments[action.toLowerCase()]; if(typeof group == "number"){ if(group){ if(args.length >= group){ var segment = {action: action, args: args.slice(0, args.length - args.length % group)}; this.segments.push(segment); this._updateWithSegment(segment); } }else{ var segment = {action: action, args: []}; this.segments.push(segment); this._updateWithSegment(segment); } }";s:7:"summary";s:14:"adds a segment";s:7:"private";b:1;}s:32:"dojox.gfx.path.Path._collectArgs";a:6:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"array";a:2:{s:4:"type";s:5:"Array";s:7:"summary";s:37:"an output argument (array of numbers)";}s:4:"args";a:2:{s:4:"type";s:5:"Array";s:7:"summary";s:99:"an input argument (can be values of Boolean, Number, dojox.gfx.Point, or an embedded array of them)";}}s:6:"source";s:306:" for(var i = 0; i < args.length; ++i){ var t = args[i]; if(typeof t == "boolean"){ array.push(t ? 1 : 0); }else if(typeof t == "number"){ array.push(t); }else if(t instanceof Array){ this._collectArgs(array, t); }else if("x" in t && "y" in t){ array.push(t.x, t.y); } }";s:7:"summary";s:54:"converts an array of arguments to plain numeric values";s:7:"private";b:1;}s:26:"dojox.gfx.path.Path.moveTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "M" : "m", args); return this; // self";s:7:"summary";s:21:"formes a move segment";s:7:"returns";s:4:"self";}s:26:"dojox.gfx.path.Path.lineTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "L" : "l", args); return this; // self";s:7:"summary";s:21:"formes a line segment";s:7:"returns";s:4:"self";}s:27:"dojox.gfx.path.Path.hLineTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "H" : "h", args); return this; // self";s:7:"summary";s:32:"formes a horizontal line segment";s:7:"returns";s:4:"self";}s:27:"dojox.gfx.path.Path.vLineTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "V" : "v", args); return this; // self";s:7:"summary";s:30:"formes a vertical line segment";s:7:"returns";s:4:"self";}s:27:"dojox.gfx.path.Path.curveTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "C" : "c", args); return this; // self";s:7:"summary";s:22:"formes a curve segment";s:7:"returns";s:4:"self";}s:33:"dojox.gfx.path.Path.smoothCurveTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "S" : "s", args); return this; // self";s:7:"summary";s:29:"formes a smooth curve segment";s:7:"returns";s:4:"self";}s:28:"dojox.gfx.path.Path.qCurveTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "Q" : "q", args); return this; // self";s:7:"summary";s:32:"formes a quadratic curve segment";s:7:"returns";s:4:"self";}s:34:"dojox.gfx.path.Path.qSmoothCurveTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "T" : "t", args); return this; // self";s:7:"summary";s:39:"formes a quadratic smooth curve segment";s:7:"returns";s:4:"self";}s:25:"dojox.gfx.path.Path.arcTo";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:131:" var args = []; this._collectArgs(args, arguments); this._pushSegment(this.absolute ? "A" : "a", args); return this; // self";s:7:"summary";s:30:"formes an elliptic arc segment";s:7:"returns";s:4:"self";}s:29:"dojox.gfx.path.Path.closePath";a:5:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:6:"source";s:52:" this._pushSegment("Z", []); return this; // self";s:7:"summary";s:13:"closes a path";s:7:"returns";s:4:"self";}s:28:"dojox.gfx.path.Path._setPath";a:6:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"path";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:18:"an SVG path string";}}s:6:"source";s:530:" var p = dojo.isArray(path) ? path : path.match(dojox.gfx.pathSvgRegExp); this.segments = []; this.absolute = true; this.bbox = {}; this.last = {}; if(!p) return; // create segments var action = "", // current action args = [], // current arguments l = p.length; for(var i = 0; i < l; ++i){ var t = p[i], x = parseFloat(t); if(isNaN(x)){ if(action){ this._pushSegment(action, args); } args = []; action = t; }else{ args.push(x); } } this._pushSegment(action, args);";s:7:"summary";s:37:"forms a path using an SVG path string";s:7:"private";b:1;}s:28:"dojox.gfx.path.Path.setShape";a:7:{s:9:"prototype";s:19:"dojox.gfx.path.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:342:" dojox.gfx.Shape.prototype.setShape.call(this, typeof newShape == "string" ? {path: newShape} : newShape); var path = this.shape.path; // switch to non-updating version of path building this.shape.path = []; this._setPath(path); // switch back to the string path this.shape.path = this.shape.path.join(""); return this; // self";s:7:"summary";s:26:"forms a path using a shape";s:7:"returns";s:4:"self";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:34:"dojox.gfx.Shape.prototype.setShape";}}}s:24:"dojox.gfx.path.Path._2PI";a:3:{s:9:"prototype";s:19:"dojox.gfx.path.Path";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.gfx.path.Path.absolute";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:26:"dojox.gfx.path.Path.bbox.l";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:26:"dojox.gfx.path.Path.bbox.r";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:26:"dojox.gfx.path.Path.bbox.t";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:26:"dojox.gfx.path.Path.bbox.b";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:24:"dojox.gfx.path.Path.bbox";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:26:"dojox.gfx.path.Path.last.x";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:26:"dojox.gfx.path.Path.last.y";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:30:"dojox.gfx.path.Path.shape.path";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.m";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.l";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.h";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.v";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.c";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.s";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.q";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.t";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.a";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:36:"dojox.gfx.path.Path._validSegments.z";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:28:"dojox.gfx.path.Path.segments";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:24:"dojox.gfx.path.Path.last";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:25:"dojox.gfx.path.Path.shape";a:2:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:7:"summary";s:0:"";}s:27:"dojox.gfx.path.Path.rawNode";a:3:{s:8:"instance";s:19:"dojox.gfx.path.Path";s:4:"type";s:4:"Node";s:7:"summary";s:41:"a DOM node to be used by this path object";}s:23:"dojox.gfx.path.TextPath";a:6:{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:28:"a TextPath shape constructor";s:10:"parameters";a:1:{s:7:"rawNode";a:2:{s:4:"type";s:4:"Node";s:7:"summary";s:45:"a DOM node to be used by this TextPath object";}}s:6:"source";s:171:" if(!("text" in this)){ this.text = dojo.clone(dojox.gfx.defaultTextPath); } if(!("fontStyle" in this)){ this.fontStyle = dojo.clone(dojox.gfx.defaultFont); }";s:9:"classlike";b:1;}s:31:"dojox.gfx.path.TextPath.getText";a:5:{s:9:"prototype";s:23:"dojox.gfx.path.TextPath";s:4:"type";s:8:"Function";s:6:"source";s:29:" return this.text; // Object";s:7:"summary";s:39:"returns the current text object or null";s:7:"returns";s:6:"Object";}s:31:"dojox.gfx.path.TextPath.setText";a:6:{s:9:"prototype";s:23:"dojox.gfx.path.TextPath";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"newText";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:151:" this.text = dojox.gfx.makeParameters(this.text, typeof newText == "string" ? {text: newText} : newText); this._setText(); return this; // self";s:7:"summary";s:38:"sets a text to be drawn along the path";s:7:"returns";s:4:"self";}s:31:"dojox.gfx.path.TextPath.getFont";a:5:{s:9:"prototype";s:23:"dojox.gfx.path.TextPath";s:4:"type";s:8:"Function";s:6:"source";s:34:" return this.fontStyle; // Object";s:7:"summary";s:39:"returns the current font object or null";s:7:"returns";s:6:"Object";}s:31:"dojox.gfx.path.TextPath.setFont";a:6:{s:9:"prototype";s:23:"dojox.gfx.path.TextPath";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"newFont";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:190:" this.fontStyle = typeof newFont == "string" ? dojox.gfx.splitFontString(newFont) : dojox.gfx.makeParameters(dojox.gfx.defaultFont, newFont); this._setFont(); return this; // self";s:7:"summary";s:20:"sets a font for text";s:7:"returns";s:4:"self";}s:28:"dojox.gfx.path.TextPath.text";a:2:{s:8:"instance";s:23:"dojox.gfx.path.TextPath";s:7:"summary";s:0:"";}s:33:"dojox.gfx.path.TextPath.fontStyle";a:2:{s:8:"instance";s:23:"dojox.gfx.path.TextPath";s:7:"summary";s:0:"";}s:14:"dojox.gfx.path";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:"";}}