Lines Matching refs:R

451     function R(first) {  function
452 if (R.is(first, "function")) {
454 } else if (R.is(first, array)) {
455 return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);
458 if (R.is(args[args.length - 1], "function")) {
460 … return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {
461 f.call(R._engine.create[apply](R, args));
464 return R._engine.create[apply](R, arguments);
468 R.version = "2.1.2";
469 R.eve = eve;
549 ISURL = R._ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i,
558 availableAttrs = R._availableAttrs = {
598 availableAnimAttrs = R._availableAnimAttrs = {
627 …radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u…
639 rectPath = R._rectPath = function (x, y, w, h, r) {
651 getPath = R._getPath = {
690 mapPath = R.mapPath = function (path, matrix) {
708 R._g = g;
715R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Ba…
716 if (R.type == "VML") {
723 return (R.type = E);
739 R.svg = !(R.vml = R.type == "VML");
740 R._Paper = Paper;
767 R.fn = paperproto = Paper.prototype = R.prototype;
768 R._id = 0;
769 R._oid = 0;
780 R.is = function (o, type) {
820 R.angle = function (x1, y1, x2, y2, x3, y3) {
829 return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);
841 R.rad = function (deg) {
853 R.deg = function (rad) {
867 R.snapTo = function (values, value, tolerance) {
868 tolerance = R.is(tolerance, "finite") ? tolerance : 10;
869 if (R.is(values, array)) {
893 var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {
911 R.setWindow = function (newwin) {
912 eve("raphael.setWindow", R, g.win, newwin);
915 if (R._engine.initWin) {
916 R._engine.initWin(g.win);
920 if (R.vml) {
965 if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) {
970 if (g == null && R.is(r, string)) {
971 var clr = R.getRGB(r);
992 hex: R.rgb(r, g, b),
995 R.is(o, "finite") && (rgb.opacity = o);
1019 R.color = function (clr) {
1021 if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {
1022 rgb = R.hsb2rgb(clr);
1027 } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {
1028 rgb = R.hsl2rgb(clr);
1034 if (R.is(clr, "string")) {
1035 clr = R.getRGB(clr);
1037 if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) {
1038 rgb = R.rgb2hsl(clr);
1042 rgb = R.rgb2hsb(clr);
1069 R.hsb2rgb = function (h, s, v, o) {
1077 var R, G, B, X, C;
1081 R = G = B = v - C;
1084 R += [C, X, 0, 0, X, C][h];
1087 return packageRGB(R, G, B, o);
1106 R.hsl2rgb = function (h, s, l, o) {
1118 var R, G, B, X, C;
1122 R = G = B = l - C / 2;
1125 R += [C, X, 0, 0, X, C][h];
1128 return packageRGB(R, G, B, o);
1146 R.rgb2hsb = function (r, g, b) {
1180 R.rgb2hsl = function (r, g, b) {
1201 R._path2string = function () {
1227 var preload = R._preload = function (src, f) {
1273 R.getRGB = cacher(function (colour) {
1322 return R.hsb2rgb(red, green, blue, opacity);
1335 return R.hsl2rgb(red, green, blue, opacity);
1339 R.is(opacity, "finite") && (rgb.opacity = opacity);
1343 }, R);
1355 R.hsb = cacher(function (h, s, b) {
1356 return R.hsb2rgb(h, s, b).hex;
1369 R.hsl = cacher(function (h, s, l) {
1370 return R.hsl2rgb(h, s, l).hex;
1383 R.rgb = cacher(function (r, g, b) {
1395 R.getColor = function (value) {
1412 R.getColor.reset = function () {
1465 R.parsePathString = function (pathString) {
1476 if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption
1501 data.toString = R._path2string;
1516 R.parseTransformString = cacher(function (TString) {
1522 if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption
1535 data.toString = R._path2string;
1596 R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
1654 R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
1655 if (!R.is(p1x, "array")) {
1681 R.isPointInsideBBox = function (bbox, x, y) {
1696 R.isBBoxIntersect = function (bbox1, bbox2) {
1697 var i = R.isPointInsideBBox;
1791 var bbox1 = R.bezierBBox(bez1),
1792 bbox2 = R.bezierBBox(bez2);
1793 if (!R.isBBoxIntersect(bbox1, bbox2)) {
1805 var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));
1809 p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));
1869 R.pathIntersection = function (path1, path2) {
1872 R.pathIntersectionNumber = function (path1, path2) {
1876 path1 = R._path2curve(path1);
1877 path2 = R._path2curve(path2);
1941 R.isPointInsidePath = function (path, x, y) {
1942 var bbox = R.pathBBox(path);
1943 return R.isPointInsideBBox(bbox, x, y) &&
1946 R._removedFactory = function (methodname) {
1972 var pathDimensions = R.pathBBox = function (path) {
2022 res.toString = R._path2string;
2025 pathToRelative = R._pathToRelative = function (pathArray) {
2030 … if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
2031 pathArray = R.parsePathString(pathArray);
2100 res.toString = R._path2string;
2104 pathToAbsolute = R._pathToAbsolute = function (pathArray) {
2109 … if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
2110 pathArray = R.parsePathString(pathArray);
2197 res.toString = R._path2string;
2355 path2curve = R._path2curve = cacher(function (path, path2) {
2466 parseDots = R._parseDots = cacher(function (gradient) {
2471 dot.color = R.getRGB(par[1]);
2503 tear = R._tear = function (el, paper) {
2509 tofront = R._tofront = function (el, paper) {
2519 toback = R._toback = function (el, paper) {
2529 insertafter = R._insertafter = function (el, el2, paper) {
2537 insertbefore = R._insertbefore = function (el, el2, paper) {
2557 toMatrix = R.toMatrix = function (path, transform) {
2582 transformPath = R.transformPath = function (path, transform) {
2585 extractTransform = R._extractTransform = function (el, tstr) {
2590 var tdata = R.parseTransformString(tstr),
2701 equaliseTransform = R._equaliseTransform = function (t1, t2) {
2703 t1 = R.parseTransformString(t1) || [];
2704 t2 = R.parseTransformString(t2) || [];
2731 R._getContainer = function (x, y, w, h) {
2733 container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
2771 R.pathToRelative = pathToRelative;
2772 R._engine = {};
2784 R.path2curve = path2curve;
2801 R.matrix = function (a, b, c, d, e, f) {
2925 a = R.rad(a);
2963 return R.svg ?
3019 out.rotate = R.deg(math.acos(cos));
3024 out.rotate = R.deg(math.asin(sin));
3196 R.unmousemove(dragMove).unmouseup(dragUp);
3220 elproto = R.el = {};
3431 R[eventName] = elproto[eventName] = function (fn, scope) {
3432 if (R.is(fn, "function")) {
3438 R["un" + eventName] = elproto["un" + eventName] = function (fn) {
3442 … if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) {
3484 if (R.is(key, "object")) {
3606 !drag.length && R.mousemove(dragMove).mouseup(dragUp);
3642 !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);
3662 var out = R._engine.circle(this, x || 0, y || 0, r || 0);
3688 var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);
3710 var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);
3747 pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);
3748 var out = R._engine.path(R.format[apply](R, arguments), this);
3771 var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0);
3792 var out = R._engine.text(this, x || 0, y || 0, Str(text));
3814 …!R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.le…
3863 return R._engine.setSize.call(this, width, height);
3881 return R._engine.setViewBox.call(this, x, y, w, h, fit);
3902 paperproto.raphael = R;
3970 if (R.isBBoxIntersect(el.getBBox(), bbox)) {
4068 rp = R.transformPath(rp, this.attr('transform'));
4070 return R.isPointInsidePath(rp, x, y);
4187 …return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c…
4226 …point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4…
4246 R.getTotalLength = getTotalLength;
4265 R.getPointAtLength = getPointAtLength;
4280 R.getSubpath = function (path, from, to) {
4341 getPath = R._getPath[this.type];
4372 return R.getSubpath(path, from, to);
4391 var ef = R.easing_formulas = {
4568 R.is(f, "function") && f.call(el);
4585 R.svg && that && that.paper && that.paper.safari();
4618 var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),
4801 from[attr] = R.getRGB(from[attr]);
4802 var toColour = R.getRGB(to[attr]);
4899 easyeasy = R.easing_formulas[easing];
4967 R.animation = function (params, ms, easing, callback) {
4971 if (R.is(easing, "function") || !easing) {
5015 var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);
5242 if (name && R.is(name, array) && R.is(name[0], "object")) {
5321 (R.is(easing, "function") || !easing) && (callback = easing || null);
5333 easing = R.is(easing, string) ? easing : collector;
5334 var anim = R.animation(params, ms, easing, collector);
5437 R.registerFont = function (font) {
5496 if (!R.fonts) {
5499 var font = R.fonts[family];
5502 for (var fontName in R.fonts) if (R.fonts[has](fontName)) {
5504 font = R.fonts[fontName];
5550 R.is(font, "string") && (font = this.getFont(font));
5571 …path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, heigh…
5610 if (R.is(json, "array")) {
5642 R.format = function (token, params) {
5643 var args = R.is(params, array) ? [0][concat](params) : arguments;
5644 …token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str,…
5672 R.fullfill = (function () {
5709 R.ninja = function () {
5711 return R;
5733 R.st = setproto;
5744 (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload");
5764 if (!R.svg) {
5776 eve = R.eve,
5788 R.toString = function () {
5804 el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el);
5816 el = R._g.doc.getElementById(id);
5818 gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {
5838 var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],
5851 var dots = R._parseDots(gradient);
5963 if (!R._g.doc.getElementById(pathId)) {
5973 var marker = R._g.doc.getElementById(markerId),
6000 to = R.getTotalLength(attrs.path) - delta * stroke;
6003 to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);
6008 attr.d = R.getSubpath(attrs.path, from, to);
6019 to = R.getTotalLength(attrs.path) - from;
6022 to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);
6024 o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)});
6032 var item = R._g.doc.getElementById(attr);
6071 if (!R._availableAttrs[has](att)) {
6088 var val = R._g.doc.createTextNode(value);
6126 el.id = R.createUUID();
6141 … var clip = R._g.doc.getElementById(path.replace(/(^url\(#|\)$)/g, E));
6150 $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"});
6235 var isURL = Str(value).match(R._ISURL);
6239 el.id = R.createUUID();
6245 R._preload(isURL[1], function () {
6259 var clr = R.getRGB(value);
6263 !R.is(attrs.opacity, "undefined") &&
6264 R.is(params.opacity, "undefined") &&
6266 !R.is(attrs["fill-opacity"], "undefined") &&
6267 R.is(params["fill-opacity"], "undefined") &&
6271 … var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E));
6283 clr = R.getRGB(value);
6301 … gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\(#|\)$/g, E));
6331 …fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPr…
6344 tspan.appendChild(R._g.doc.createTextNode(texts[i]));
6360 dif && R.is(dif, "finite") && $(tspans[0], {dy: dif});
6400 this.id = R._oid++;
6402 this.matrix = R.matrix();
6445 elproto = R.el;
6450 R._engine.path = function (pathString, SVG) {
6597 R._extractTransform(this, tstr);
6648 R._tear(this, paper);
6655 this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
6769 if (value == null && R.is(name, "string")) {
6782 } else if (R.is(this.paper.customAttributes[name], "function")) {
6785 out[name] = R._availableAttrs[name];
6790 if (value == null && R.is(name, "array")) {
6800 } else if (name != null && R.is(name, "object")) {
6806 …ttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.custom…
6833 svg.top != this && R._tofront(this, svg);
6853 R._toback(this, this.paper);
6874 R._insertafter(this, element, this.paper);
6890 R._insertbefore(this, element, this.paper);
6900 fltr.id = R.createUUID();
6916 R._engine.circle = function (svg, x, y, r) {
6925 R._engine.rect = function (svg, x, y, w, h, r) {
6934 R._engine.ellipse = function (svg, x, y, rx, ry) {
6943 R._engine.image = function (svg, src, x, y, w, h) {
6953 R._engine.text = function (svg, x, y, text) {
6962 font: R._availableAttrs.font,
6970 R._engine.setSize = function (width, height) {
6980 R._engine.create = function () {
6981 var con = R._getContainer.apply(0, arguments),
7005 R._g.doc.body.appendChild(cnvs);
7015 container = new R._Paper;
7025 R._engine.setViewBox = function (x, y, w, h, fit) {
7066 R.prototype.renderfix = function () {
7094 R.prototype.clear = function () {
7095 R.eve("raphael.clear", this);
7101 …(this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\xebl " + R.version…
7111 R.prototype.remove = function () {
7115 this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
7118 var setproto = R.st;
7142 if (!R.vml) {
7155 eve = R.eve,
7169 command = R._pathToAbsolute;
7170 Str(path).match(total) && (command = R._path2curve);
7172 if (command == R._pathToAbsolute && !Str(path).match(total)) {
7202 var m = R.matrix();
7250 R.toString = function () {
7297 a.path = R._getPath[o.type](o);
7306 …node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path);
7319 …node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry…
7327 var div = node.clipRect || R._g.doc.createElement("div"),
7329 dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);
7383 var isURL = Str(params.fill).match(R._ISURL);
7393 R._preload(isURL[1], function () {
7397 fill.color = R.getRGB(params.fill).hex;
7400 …if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt…
7408 …ty = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).…
7429 var strokeColor = R.getRGB(params.stroke);
7479 …("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), …
7514 gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {
7532 var dots = R._parseDots(gradient);
7566 this.id = R._oid++;
7572 this.matrix = R.matrix();
7589 var elproto = R.el;
7603 R._extractTransform(this, vbt + tstr);
7724 R.eve.unbind("raphael.*.*." + this.id);
7725 R._tear(this, this.paper);
7729 this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
7746 if (value == null && R.is(name, "string")) {
7756 } else if (R.is(this.paper.customAttributes[name], "function")) {
7759 out[name] = R._availableAttrs[name];
7764 if (this.attrs && value == null && R.is(name, "array")) {
7776 value == null && R.is(name, "object") && (params = name);
7781 …ttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.custom…
7799 this.paper && this.paper.top != this && R._tofront(this, this.paper);
7808 R._toback(this, this.paper);
7816 if (element.constructor == R.st.constructor) {
7824 R._insertafter(this, element, this.paper);
7831 if (element.constructor == R.st.constructor) {
7835 R._insertbefore(this, element, this.paper);
7845 s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5));
7854 R._engine.path = function (pathString, vml) {
7874 R._engine.rect = function (vml, x, y, w, h, r) {
7875 var path = R._rectPath(x, y, w, h, r),
7887 R._engine.ellipse = function (vml, x, y, rx, ry) {
7903 R._engine.circle = function (vml, x, y, r) {
7917 R._engine.image = function (vml, src, x, y, w, h) {
7918 var path = R._rectPath(x, y, w, h),
7940 R._engine.text = function (vml, x, y, text) {
7947 … path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1);
7958 font: R._availableAttrs.font,
7981 R._engine.setSize = function (width, height) {
7991 R._engine.setViewBox.apply(this, this._viewBox);
7995 R._engine.setViewBox = function (x, y, w, h, fit) {
7996 R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
8023 R._engine.initWin = function (win) {
8037 R._engine.initWin(R._g.win);
8038 R._engine.create = function () {
8039 var con = R._getContainer.apply(0, arguments),
8049 var res = new R._Paper,
8050 c = res.canvas = R._g.doc.createElement("div"),
8062 res.span = R._g.doc.createElement("span");
8065 …cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;cl…
8067 R._g.doc.body.appendChild(c);
8081 R.prototype.clear = function () {
8082 R.eve("raphael.clear", this);
8084 this.span = R._g.doc.createElement("span");
8089 R.prototype.remove = function () {
8090 R.eve("raphael.remove", this);
8093 this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;
8098 var setproto = R.st;
8114 oldRaphael.was ? (g.win.Raphael = R) : (Raphael = R);
8116 return R;