Draws the area that will be placed below the line
@private
345800
function drawArea(){
            if (area) {
                svg.selectAll('.sparkline-area').remove();
            }

            area = d3Shape.area()
                .x(({date}) => xScale(date))
                .y0(() => yScale(0) + lineStrokeWidth / 2)
                .y1(({value}) => yScale(value))
                .curve(d3Shape.curveBasis);

            svg.select('.chart-group')
              .append('path')
                .datum(data)
                .attr('class', 'sparkline-area')
                .attr('fill', `url(#${areaGradientId})`)
                .attr('d', area)
                .attr('clip-path', `url(#${maskingClipId})`);
        }
1351512
function (line, options, redraw) {
            if (typeof options === "undefined") { options = {}; }
            if (typeof redraw === "undefined") { redraw = false; }
            var screen = this.screen, points, ctx = this.ctx, prop, opts;

            ctx.save();
            ctx.lineWidth = (options.lineWidth || 4) / (screen.scale.x - screen.scale.y);

            // Don't try to draw the line at infinity
            if (line.type === 'line' && MathLib.isZero(line[0]) && MathLib.isZero(line[1])) {
                return this;
            } else {
                points = this.screen.getLineEndPoints(line);
            }

            // Set the drawing options
            if (options) {
                opts = MathLib.Canvas.convertOptions(options);
                for (prop in opts) {
                    if (opts.hasOwnProperty(prop)) {
                        ctx[prop] = opts[prop];
                    }
                }

                if ('setLineDash' in ctx) {
                    ctx.setLineDash(('dash' in options ? options.dash : []));
                }
                if ('lineDashOffset' in ctx) {
                    ctx.lineDashOffset = ('dashOffset' in options ? options.dashOffset : 0);
                }
            }

            // Draw the line
            ctx.beginPath();
            ctx.moveTo(points[0][0], points[0][1]);
            ctx.lineTo(points[1][0], points[1][1]);
            ctx.stroke();
            ctx.closePath();
            ctx.restore();

            if (!redraw) {
                this.stack.push({
                    type: 'line',
                    object: line,
                    options: options
                });
            }

            return this;
        }
1284853
function draw(attrsModified) {
    calc();
    if (isChanged && value != prevValue)
      slider.dispatchEvent(onChange);
    isChanged = false;
    if (!attrsModified && value == prevValue)
      return;
    prevValue = value;
    var position = range ? (value - min) / range * 100 : 0;
    var bg = '-moz-element(#__sliderthumb__) ' + position + '% no-repeat, ';
    style(slider, { background: bg + track });
  }
899451
function drawArea() {
            if (brushArea) {
                svg.selectAll('.brush-area').remove();
            }

            // Create and configure the area generator
            brushArea = d3Shape.area()
                .x(({date}) => xScale(date))
                .y0(chartHeight)
                .y1(({value}) => yScale(value))
                .curve(d3Shape.curveBasis);

            // Create the area path
            svg.select('.chart-group')
              .append('path')
                .datum(data)
                .attr('class', 'brush-area')
                .attr('d', brushArea);
        }
688901
function drawNodeCanvas(node, color) {
    var parent = node.getParent();
    var depth = node.getDepth();
    var offsetX = node.offset.x;
    var offsetY = node.offset.y;
    color = color || node.branchColor;

    var $node = $getNode(node);
    var $parent = $getNode(parent);
    var $canvas = $getNodeCanvas(node);

    drawLineCanvas($canvas, depth, offsetX, offsetY, $node, $parent, color);
  }
601120
function drawBullet() {
            if (rangesEl) {
                rangesEl.remove();
                measuresEl.remove();
                markersEl.remove();
            }

            rangesEl = svg.select('.chart-group')
              .selectAll('rect.range')
              .data(ranges)
              .enter()
                .append('rect')
                  .attr('fill', rangeColor)
                  .attr('opacity', (d, i) => rangeOpacityScale[i])
                  .attr('class', (d, i) => `range r${i}`)
                  .attr('width', barWidth)
                  .attr('height', chartHeight)
                  .attr('x', isReverse ? xScale : 0);

            measuresEl = svg.select('.chart-group')
              .selectAll('rect.measure')
              .data(measures)
              .enter()
                .append('rect')
                  .attr('fill', measureColor)
                  .attr('fill-opacity', (d, i) => measureOpacityScale[i])
                  .attr('class', (d, i) => `measure m${i}`)
                  .attr('width', barWidth)
                  .attr('height', getMeasureBarHeight)
                  .attr('x', isReverse ? xScale : 0)
                  .attr('y', getMeasureBarHeight);

            markersEl = svg.select('.chart-group')
              .selectAll('line.marker-line')
              .data(markers)
              .enter()
                .append('line')
                  .attr('class', 'marker-line')
                  .attr('stroke', measureColor)
                  .attr('stroke-width', markerStrokeWidth)
                  .attr('opacity', measureOpacityScale[0])
                  .attr('x1', xScale)
                  .attr('x2', xScale)
                  .attr('y1', 0)
                  .attr('y2', chartHeight);
        }
305766
function drawChart(canvas, data) {
        var ctx = canvas.getContext('2d'),
            color = 'rgba(0, 0, 0, 0.75)',
            height = canvas.height - 2,
            width = canvas.width,
            total = data.length,
            max = Math.max.apply(Math, data),
            xstep = 1,
            ystep = max / height,
            x = 0,
            y = height - data[0] / ystep;

        ctx.clearRect(0, 0, width, height);
        ctx.beginPath();
        ctx.strokeStyle = color;
        ctx.moveTo(x, y);

        for (var i = 1; i < total; i++) {
            x += xstep;
            y = height - data[i] / ystep + 1;
            ctx.moveTo(x, height);
            ctx.lineTo(x, y);
        }

        ctx.stroke();
    }
457816
function _drawLineStrip(points, color) {
        if (points.length < 2) {
            console.error('Line strips must have at least 2 points.');
            return;
        }

        var p = new Primitive();

        p.vertices = points;
        p.color = toColor(color);

        renderer.addPrimitive(p);
    }
702624
function (d, context) {
                    dimple._drawMarkers(d, chart, series, duration, className, graded, onEnter(d), onLeave(d), context);
                }
1330024
function() {
			for( var i = 0, j = this.touchableAreasCount; i < j; i++ ) {
				var area = this.touchableAreas[ i ];
				if( typeof area === 'undefined' ) continue;
				area.draw();
				// Go through all touches to see if any hit this area
				var touched = false;
				for( var k = 0, l = this.touches.length; k < l; k++ ) {
					var touch = this.touches[ k ];
					if( typeof touch === 'undefined' ) continue;
					var x = this.normalizeTouchPositionX(touch.clientX),
						y = this.normalizeTouchPositionY(touch.clientY);
					// Check that it's in the bounding box/circle
					if( area.check(x, y) && !touched) touched = this.touches[k];
				}

				if( touched ) {
					if( !area.active ) area.touchStartWrapper(touched);
					area.touchMoveWrapper(touched);
				} else if( area.active ) area.touchEndWrapper(touched);
			}
		}
1223299
function() {
        var target = this.redoStack && this.redoStack.pop();
        if (target) {
            this.line.geometry.addComponent(target, this.getCurrentPointIndex());
            this.drawFeature();
        }
        return !!target;
    }
432224
function drawCell(cell, canvas, loc, fill) {
  // Also takes in a number and outputs a cell.
  if (typeof loc == 'undefined') loc = {x: 0, y: 0};
  if (typeof fill == 'undefined') fill = '#8ED6FF';

  var quadrant_width = 50;
  // Given a number in a quadrant and a location specifying the top left corner of
  // the quadrant, draw the relevant shape.
  function drawQuadrant(n, q, loc) {
    // draw upper triangle going certain direction at location
    function drawUpperTriangle(d, loc) {
      if (d == "r") {
        var first = {x: 50, y: 0};
        var second = {x: 50, y: 50};
      } else {
        var first = {x: 50, y: 0};
        var second = {x: 0, y: 50};
      }
      context.beginPath();
      context.moveTo(loc.x, loc.y);
      context.lineTo(loc.x + first.x, loc.y + first.y);
      context.lineTo(loc.x + second.x, loc.y + second.y);
      context.lineTo(loc.x, loc.y);
      context.lineWidth = 1;
      context.strokeStyle = 'black';
      context.stroke();
      context.fillStyle = fill;
      context.fill();
      context.closePath();
    }
    function drawLowerTriangle(d, loc) {
      if (d == "r") {
        loc = {x: loc.x + 50, y: loc.y};
        var first = {x: 0, y: 50};
        var second = {x: -50, y: 50};
      } else {
        var first = {x: 50, y: 50};
        var second = {x: 0, y: 50};
      }
      context.beginPath();
      context.moveTo(loc.x, loc.y);
      context.lineTo(loc.x + first.x, loc.y + first.y);
      context.lineTo(loc.x + second.x, loc.y + second.y);
      context.lineTo(loc.x, loc.y);
      context.lineWidth = 1;
      context.strokeStyle = 'black';
      context.stroke();
      context.fillStyle = fill;
      context.fill();
      context.closePath();
    }
    function drawTileOutline(loc) {
      context.beginPath();
      context.moveTo(loc.x, loc.y);
      context.lineTo(loc.x + 50, loc.y);
      context.lineTo(loc.x + 50, loc.y + 50);
      context.lineTo(loc.x, loc.y + 50);
      context.lineTo(loc.x, loc.y);
      context.lineWidth = 1;
      context.strokeStyle = 'black';
      context.stroke();
      context.closePath();
    }
    // blank space, just draw outline without filling.
    if (n == 0) {
      drawTileOutline(loc);
    } else if (n == 1) { // tile.
      context.beginPath();
      context.moveTo(loc.x, loc.y);
      context.lineTo(loc.x + 50, loc.y);
      context.lineTo(loc.x + 50, loc.y + 50);
      context.lineTo(loc.x, loc.y + 50);
      context.lineTo(loc.x, loc.y);
      context.lineWidth = 1;
      context.strokeStyle = 'black';
      context.stroke();
      context.fillStyle = fill;
      context.fill();
      context.closePath();
    } else if (n == 2) {
      drawTileOutline(loc);
      if (q == 0 || q == 2) {
        drawLowerTriangle("l", loc);
      } else {
        drawLowerTriangle("r", loc);
      }
    } else if (n == 3) {
      drawTileOutline(loc);
      if (q == 0 || q == 2) {
        drawUpperTriangle("r", loc);
      } else {
        drawUpperTriangle("l", loc);
      }
    }
  }
  var context = canvas.getContext('2d');
  var offsets = [
    {x: 0, y: 0},
    {x: 50, y: 0},
    {x: 50, y: 50},
    {x: 0, y: 50}
  ];

  // number at element, quadrant
  cell.array.forEach(function(n, q) {
    var offset = offsets[q];
    var new_loc = {x: loc.x + offset.x, y: loc.y + offset.y};
    drawQuadrant(n, q, new_loc);
  });
}
198159
function drawSelection(cm) {
    var display = cm.display, doc = cm.doc, result = {};
    var curFragment = result.cursors = document.createDocumentFragment();
    var selFragment = result.selection = document.createDocumentFragment();

    for (var i = 0; i < doc.sel.ranges.length; i++) {
      var range = doc.sel.ranges[i];
      var collapsed = range.empty();
      if (collapsed || cm.options.showCursorWhenSelecting)
        drawSelectionCursor(cm, range, curFragment);
      if (!collapsed)
        drawSelectionRange(cm, range, selFragment);
    }

    // Move the hidden textarea near the cursor to prevent scrolling artifacts
    if (cm.options.moveInputWithCursor) {
      var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
      var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
      result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
                                          headPos.top + lineOff.top - wrapOff.top));
      result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
                                           headPos.left + lineOff.left - wrapOff.left));
    }

    return result;
  }
50665
function drawHorizontalExtendedLine() {
            baseLine = svg.select('.grid-lines-group')
                .selectAll('line.extended-x-line')
                .data([0])
                .enter()
                  .append('line')
                    .attr('class', 'extended-x-line')
                    .attr('x1', xAxisPadding.left)
                    .attr('x2', chartWidth)
                    .attr('y1', chartHeight)
                    .attr('y2', chartHeight);
        }
543951
function () {
		
		// Define or reset areaPath
		this.areaPath = [];
		
		// Call the base method
		Series.prototype.drawGraph.apply(this);
		
		// Define local variables
		var series = this,
			areaPath = this.areaPath,
			options = this.options,
			negativeColor = options.negativeColor,
			negativeFillColor = options.negativeFillColor,
			props = [['area', this.color, options.fillColor]]; // area name, main color, fill color
		
		if (negativeColor || negativeFillColor) {
			props.push(['areaNeg', negativeColor, negativeFillColor]);
		}
		
		each(props, function (prop) {
			var areaKey = prop[0],
				area = series[areaKey];
				
			// Create or update the area
			if (area) { // update
				area.animate({ d: areaPath });
	
			} else { // create
				series[areaKey] = series.chart.renderer.path(areaPath)
					.attr({
						fill: pick(
							prop[2],
							Color(prop[1]).setOpacity(pick(options.fillOpacity, 0.75)).get()
						),
						zIndex: 0 // #1069
					}).add(series.group);
			}
		});
	}
684458
function lineTop (){
    var l = line(chars.top
               , chars['top-left'] || chars.top
               , chars['top-right'] ||  chars.top
               , chars['top-mid']);
    if (l)
      ret += l + "\n";
  }
1301129
function drawTileLayer(renderer, layer, rect) {
         // get top-left and bottom-right tile position
         var start = this.pixelToTileCoords(rect.pos.x, rect.pos.y, me.pool.pull("me.Vector2d")).floorSelf();
         var end = this.pixelToTileCoords(rect.pos.x + rect.width + this.tilewidth, rect.pos.y + rect.height + this.tileheight, me.pool.pull("me.Vector2d")).ceilSelf(); //ensure we are in the valid tile range

         start.x = start.x < 0 ? 0 : start.x;
         start.y = start.y < 0 ? 0 : start.y;
         end.x = end.x > this.cols ? this.cols : end.x;
         end.y = end.y > this.rows ? this.rows : end.y; // main drawing loop

         for (var y = start.y; y < end.y; y++) {
           for (var x = start.x; x < end.x; x++) {
             var tmxTile = layer.layerData[x][y];

             if (tmxTile) {
               this.drawTile(renderer, x, y, tmxTile);
             }
           }
         }

         me.pool.push(start);
         me.pool.push(end);
       }