Draw the points where each point is one needle
6211
function () {
			var series = this,
				yAxis = series.yAxis,
				center = yAxis.center,
				options = series.options,
				renderer = series.chart.renderer,
				overshoot = options.overshoot,
				overshootVal = overshoot && typeof overshoot === 'number' ? overshoot / 180 * Math.PI : 0;

			H.each(series.points, function (point) {
				var graphic = point.graphic,
					rotation = yAxis.startAngleRad + yAxis.translate(point.y, null, null, null, true),
					radius = (pInt(pick(point.options.radius, options.radius, 100)) * center[2]) / 200, // docs: series<solidgauge>.data.radius http://jsfiddle.net/highcharts/7nwebu4b/
					innerRadius = (pInt(pick(point.options.innerRadius, options.innerRadius, 60)) * center[2]) / 200, // docs: series<solidgauge>.data.innerRadius
					shapeArgs,
					d,
					toColor = yAxis.toColor(point.y, point),
					fromColor;

				if (toColor === 'none') { // #3708
					toColor = point.color || series.color || 'none';
				}
				if (toColor !== 'none') {
					fromColor = point.color;
					point.color = toColor;
				}

				// Handle overshoot and clipping to axis max/min
				rotation = Math.max(yAxis.startAngleRad - overshootVal, Math.min(yAxis.endAngleRad + overshootVal, rotation));

				// Handle the wrap option
				if (options.wrap === false) {
					rotation = Math.max(yAxis.startAngleRad, Math.min(yAxis.endAngleRad, rotation));
				}
				rotation = rotation * 180 / Math.PI;

				var angle1 = rotation / (180 / Math.PI),
					angle2 = yAxis.startAngleRad,
					minAngle = Math.min(angle1, angle2),
					maxAngle = Math.max(angle1, angle2);

				if (maxAngle - minAngle > 2 * Math.PI) {
					maxAngle = minAngle + 2 * Math.PI;
				}

				point.shapeArgs = shapeArgs = {
					x: center[0],
					y: center[1],
					r: radius,
					innerR: innerRadius,
					start: minAngle,
					end: maxAngle,
					fill: toColor
				};
				point.startR = radius; // For PieSeries.animate

				if (graphic) {
					d = shapeArgs.d;
					graphic.animate(shapeArgs);
					shapeArgs.d = d; // animate alters it
				} else {					
					point.graphic = renderer.arc(shapeArgs)
						.attr({
							stroke: options.borderColor || 'none',
							'stroke-width': options.borderWidth || 0,
							fill: toColor,
							'sweep-flag': 0
						})
						.add(series.group);
				}
			});
		}
216605
def drawpoint(self, x, y, colour = None):
        
        self.checkforpilimage()
        colour = self.defaultcolour(colour)
        self.changecolourmode(colour)
        self.makedraw()
        
        (pilx, pily) = self.pilcoords((x,y))
        
        self.draw.point((pilx, pily), fill = colour)
537969
function () {
            var series = this,
              pointAttr,
              points = series.points,
              chart = series.chart,
              plotX,
              plotY,
              i,
              point,
              radius,
              symbol,
              isImage,
              graphic,
              options = series.options,
              seriesMarkerOptions = options.marker,
              seriesPointAttr = series.pointAttr[''],
              pointMarkerOptions,
              hasPointMarker,
              enabled,
              isInside,
              markerGroup = series.markerGroup,
              globallyEnabled = pick(
                seriesMarkerOptions.enabled,
                !series.requireSorting || series.activePointCount < (0.5 * series.xAxis.len / seriesMarkerOptions.radius)
              );

            if (seriesMarkerOptions.enabled !== false || series._hasPointMarkers) {

                i = points.length;
                while (i--) {
                    point = points[i];
                    plotX = mathFloor(point.plotX); // #1843
                    plotY = point.plotY;
                    graphic = point.graphic;
                    pointMarkerOptions = point.marker || {};
                    hasPointMarker = !!point.marker;
                    enabled = (globallyEnabled && pointMarkerOptions.enabled === UNDEFINED) || pointMarkerOptions.enabled;
                    isInside = chart.isInsidePlot(mathRound(plotX), plotY, chart.inverted); // #1858

                    // only draw the point if y is defined
                    if (enabled && plotY !== UNDEFINED && !isNaN(plotY) && point.y !== null) {

                        // shortcuts
                        pointAttr = point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE] || seriesPointAttr;
                        radius = pointAttr.r;
                        symbol = pick(pointMarkerOptions.symbol, series.symbol);
                        isImage = symbol.indexOf('url') === 0;

                        if (graphic) { // update
                            graphic[isInside ? 'show' : 'hide'](true) // Since the marker group isn't clipped, each individual marker must be toggled
                              .animate(extend({
                                  x: plotX - radius,
                                  y: plotY - radius
                              }, graphic.symbolName ? { // don't apply to image symbols #507
                                  width: 2 * radius,
                                  height: 2 * radius
                              } : {}));
                        } else if (isInside && (radius > 0 || isImage)) {
                            point.graphic = graphic = chart.renderer.symbol(
                              symbol,
                                plotX - radius,
                                plotY - radius,
                                2 * radius,
                                2 * radius,
                              hasPointMarker ? pointMarkerOptions : seriesMarkerOptions
                              )
                              .attr(pointAttr)
                              .add(markerGroup);
                        }

                    } else if (graphic) {
                        point.graphic = graphic.destroy(); // #1269
                    }
                }
            }

        }
1310259
def points_in_each_seg(path, tvals):
    """"""
    A = np.array([[-1,  3, -3,  1], # transforms cubic bez to standard poly
                  [ 3, -6,  3,  0],
                  [-3,  3,  0,  0],
                  [ 1,  0,  0,  0]])
    B = [seg.bpoints() for seg in path]
    return np.dot(B, np.dot(A, np.power(tvals, [[3],[2],[1],[0]])))
649666
function _drawArrow(pStart, pEnd, arrowSize, color) {
        var p = new Primitive();
        p.color = toColor(color);

        p.vertices.push(pStart);
        p.vertices.push(pEnd);

        var dir = new THREE.Vector3();
        dir.subVectors(pEnd, pStart);
        dir.normalize();

        var right = new THREE.Vector3();
        var dot = dir.dot(UNIT_Y);
        if (dot > 0.99 || dot < -0.99) {
            right.crossVectors(dir, UNIT_X);
        } else {
            right.crossVectors(dir, UNIT_Y);
        }

        var top = new THREE.Vector3();
        top.crossVectors(right, dir);

        dir.multiplyScalar(arrowSize);
        right.multiplyScalar(arrowSize);
        top.multiplyScalar(arrowSize);

        // Right slant.
        var tmp = new THREE.Vector3();
        p.vertices.push(pEnd);
        p.vertices.push(tmp.addVectors(pEnd, right).sub(dir));

        // Left slant.
        tmp = new THREE.Vector3();
        p.vertices.push(pEnd);
        p.vertices.push(tmp.subVectors(pEnd, right).sub(dir));

        // Top slant.
        tmp = new THREE.Vector3();
        p.vertices.push(pEnd);
        p.vertices.push(tmp.addVectors(pEnd, top).sub(dir));

        // Bottom slant.
        tmp = new THREE.Vector3();
        p.vertices.push(pEnd);
        p.vertices.push(tmp.subVectors(pEnd, top).sub(dir));

        renderer.addPrimitive(p);
    }
605851
function Draw($i = -1)
	{
		if ($i < 0 || $i >= $this->hash_prime)
		{
			$i = 0;
			$j = $this->hash_prime;
		}
		else
		{
			$j = $i + 1;
		}

		echo "Draw the XDB data [$i ~ $j]. (" . trim($this->Version()) . ")\n\n";
		while ($i < $j)
		{
			$poff = $i * 8 + 32;
			fseek($this->fd, $poff, SEEK_SET);
			$buf = fread($this->fd, 8);
			if (strlen($buf) != 8) break;
			$ptr = unpack('Ioff/Ilen', $buf);
			
			$this->_cur_depth = 0;
			$this->_node_num = 0;
			$this->_draw_node($ptr['off'], $ptr['len']);
			echo "-------------------------------------------\n";
			echo "Tree(xdb) [$i] max_depth: {$this->_cur_depth} nodes_num: {$this->_node_num}\n";			
			$i++;
		}
	}
1180102
def canvas_points(self):
        """"""

        if self.chart():
            x_axis_min = self.chart().x_lower_limit()
            y_axis_min = self.chart().y_lower_limit()
            x_axis_max = self.chart().x_upper_limit()
            y_axis_max = self.chart().y_upper_limit()
            chart_width = self.chart().width()
            chart_height = self.chart().height()
            horizontal_padding = self.chart().horizontal_padding()
            vertical_padding = self.chart().vertical_padding()
            horizontal_margin_pixels = horizontal_padding * chart_width
            vertical_margin_pixels = vertical_padding * chart_height
            x_axis_pixels = chart_width - (2 * horizontal_margin_pixels)
            y_axis_pixels = chart_height - (2 * vertical_margin_pixels)
            x_axis_span = x_axis_max - x_axis_min
            y_axis_span = y_axis_max - y_axis_min
            x_pixels_per_point = x_axis_pixels / x_axis_span
            y_pixels_per_point = y_axis_pixels / y_axis_span
            data = []
            for x, y in self.data():
                relative_x, relative_y = x - x_axis_min, y - y_axis_min
                data.append((
                 (relative_x * x_pixels_per_point) + horizontal_margin_pixels,
                 chart_height - ((relative_y * y_pixels_per_point) + vertical_margin_pixels)
                ))
            return tuple(data)
448515
function drawLinesDataset(axis, animPc, data, config, ctx, offsets, vars) {
		var xAxisPosY = vars.xAxisPosY;
		var yAxisPosX = vars.yAxisPosX;
		var valueHop = vars.valueHop;
		var nbValueHop = vars.nbValueHop;
		var scaleHop = vars.scaleHop;
		var zeroY = vars.zeroY;
		var calculatedScale = vars.calculatedScale;
		var logarithmic = vars.logarithmic;
		var currentAnimPc = animationCorrection(animPc, data, config, 0, 0, 0);
		var totvalue = new Array();
		var maxvalue = new Array();
		var lmaxvalue = new Array();
		var lminvalue = new Array();
		for (var i = 0; i < data.datasets.length; i++) {
			lmaxvalue[i] = -999999999;
			lminvalue[i] = 999999999;
			if ((axis == 2 && data.datasets[i].axis == 2) || (axis != 2 && data.datasets[i].axis != 2)) {
				for (var j = 0; j < data.datasets[i].data.length; j++) {
					totvalue[j] = 0;
					maxvalue[j] = -999999999;
				}
			}
		}
		currentAnimPc.mainVal = 1;
		for (var i = 0; i < data.datasets.length; i++) {
			if ((axis == 2 && data.datasets[i].axis == 2) || (axis != 2 && data.datasets[i].axis != 2)) {
				for (var j = 0; j < data.datasets[i].data.length; j++) {
					totvalue[j] += data.datasets[i].data[j];
					maxvalue[j] = Max([maxvalue[j], data.datasets[i].data[j]]);
					lmaxvalue[i] = Max([lmaxvalue[i], yPos(i, j)]);
					lminvalue[i] = Min([lminvalue[i], yPos(i, j)]);
				}
			}
		}
		for (var i = 0; i < data.datasets.length; i++) {
			if ((axis == 2 && data.datasets[i].axis == 2) || (axis != 2 && data.datasets[i].axis != 2)) {
				var prevpt = -1;
				var frstpt = -1;
				if (typeof data.datasets[i].strokeColor == "function") {
					ctx.strokeStyle = data.datasets[i].strokeColor("STROKECOLOR", data, config, i, -1, animPc, -1, "Line", ctx, yAxisPosX, lmaxvalue[i], yAxisPosX + valueHop * (data.datasets[i].data.length - 1), lmaxvalue[i] - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * (lmaxvalue[i] - lminvalue[i]));
				} else if (typeof data.datasets[i].strokeColor == "string") {
					ctx.strokeStyle = data.datasets[i].strokeColor;
				} else ctx.strokeStyle = config.defaultStrokeColor;
				ctx.lineWidth = config.datasetStrokeWidth;
				ctx.beginPath();
				var prevAnimPc;
				var prevXpos;
				prevAnimPc = 0;
				prevnotempty = 0;
				for (var j = 0; j < data.datasets[i].data.length; j++) {
					var xposj = xPos(i, j, data);
					currentAnimPc = animationCorrection(animPc, data, config, i, j, 0);
					if (currentAnimPc.mainVal == 0 && prevAnimPc > 0) {
						ctx.stroke();
						ctx.strokeStyle = "rgba(0,0,0,0)";
						//          ctx.lineWidth =0.01;                                                                   
						ctx.lineTo(prevXpos, xAxisPosY - zeroY);
					}
					prevAnimPc = currentAnimPc.mainVal;
					if (currentAnimPc.mainVal >= 1) {
						if (typeof(data.datasets[i].title) == "string") lgtxt = data.datasets[i].title.trim();
						else lgtxt = "";
					}
					if (!(typeof(data.datasets[i].data[j]) == 'undefined')) {
						prevXpos = xPos(i, j, data);
						if (prevpt == -1) {
							ctx.moveTo(xposj, yPos(i, j));
							frstpt = j;
						} else {
							if (config.bezierCurve) {
								ctx.bezierCurveTo(xPos(i, j - (j - prevpt) / 2, data), yPos(i, prevpt), xPos(i, j - (j - prevpt) / 2, data), yPos(i, j), xPos(i, j, data), yPos(i, j));
							} else {
								ctx.lineTo(xPos(i, j, data), yPos(i, j));
							}
						}
						if ((typeof(data.datasets[i].data[j + 1]) !== 'undefined') || (true == config.extrapolateMissingData)) {
							if (currentAnimPc.subVal > 0) {
								// next not missing value
								nxtnotmiss = -1;
								for (t = j + 1; t < data.datasets[i].data["length"] && nxtnotmiss == -1; t++) {
									if (!(typeof(data.datasets[i].data[t]) == 'undefined')) nxtnotmiss = t;
								}
								if (nxtnotmiss != -1) {
									prevXpos = xPos(i, j + currentAnimPc.subVal, data);
									if (config.bezierCurve) {
										ctx.bezierCurveTo(xPos(i, j + currentAnimPc.subVal / 2, data), yPos(i, j), xPos(i, j + currentAnimPc.subVal / 2, data), yPos(i, nxtnotmiss), xPos(i, j + currentAnimPc.subVal, data), yPos(i, nxtnotmiss));
									} else {
										ctx.lineTo(xPos(i, j + currentAnimPc.subVal, data), yPos(i, j + 1));
									}
								}
							}
							prevpt = j;
							if (animPc >= 1) {
								if (i == 0) divprev = data.datasets[i].data[j];
								else divprev = data.datasets[i].data[j] - data.datasets[i - 1].data[j];
								if (i == data.datasets.length - 1) divnext = data.datasets[i].data[j];
								else divnext = data.datasets[i].data[j] - data.datasets[i + 1].data[j];
								lgtxt2 = "";
								if (typeof data.datasets[i].xPos != "undefined") {
									if (!(typeof data.datasets[i].xPos[j] == "undefined")) lgtxt2 = data.datasets[i].xPos[j];
								}
								if (lgtxt2 == "" && !(typeof(data.labels[j]) == "undefined")) lgtxt2 = data.labels[j];
								if (typeof lgtxt2 == "string") lgtxt2 = lgtxt2.trim();
								jsGraphAnnotate[ctx.ChartNewId][jsGraphAnnotate[ctx.ChartNewId].length] = ["POINT", xPos(i, j, data), yPos(i, j), lgtxt, lgtxt2, 1 * data.datasets[i].data[j], divprev, divnext, maxvalue[j], totvalue[j], i, j];
								if (config.inGraphDataShow) {
									ctx.save();
									ctx.textAlign = config.inGraphDataAlign;
									ctx.textBaseline = config.inGraphDataVAlign;
									ctx.font = config.inGraphDataFontStyle + ' ' + config.inGraphDataFontSize + 'px ' + config.inGraphDataFontFamily;
									ctx.fillStyle = config.inGraphDataFontColor;
									var dotX = yAxisPosX + (valueHop * k),
										dotY = xAxisPosY - currentAnimPc.mainVal * (calculateOffset(logarithmic, data.datasets[i].data[j], calculatedScale, scaleHop)),
										paddingTextX = config.inGraphDataPaddingX,
										paddingTextY = config.inGraphDataPaddingY;
									var dispString = tmplbis(config.inGraphDataTmpl, {
										config: config,
										v1: fmtChartJS(config, lgtxt, config.fmtV1),
										v2: fmtChartJS(config, lgtxt2, config.fmtV2),
										v3: fmtChartJS(config, 1 * data.datasets[i].data[j], config.fmtV3),
										v4: fmtChartJS(config, divprev, config.fmtV4),
										v5: fmtChartJS(config, divnext, config.fmtV5),
										v6: fmtChartJS(config, maxvalue[j], config.fmtV6),
										v7: fmtChartJS(config, totvalue[j], config.fmtV7),
										v8: roundToWithThousands(config, fmtChartJS(config, 100 * data.datasets[i].data[j] / totvalue[j], config.fmtV8), config.roundPct),
										v9: fmtChartJS(config, yAxisPosX + (valueHop * k), config.fmtV9),
										v10: fmtChartJS(config, xAxisPosY - (calculateOffset(logarithmic, data.datasets[i].data[j], calculatedScale, scaleHop)), config.fmtV10),
										v11: fmtChartJS(config, i, config.fmtV11),
										v12: fmtChartJS(config, j, config.fmtV12),
										data: data
									});
									ctx.translate(xPos(i, j, data) + paddingTextX, yPos(i, j) - paddingTextY);
									ctx.rotate(config.inGraphDataRotate * (Math.PI / 180));
									ctx.fillTextMultiLine(dispString, 0, 0, ctx.textBaseline, config.inGraphDataFontSize);
									ctx.restore();
								}
							}
						}
					} else {
						if (false == config.extrapolateMissingData) {
							ctx.stroke();
							if (config.datasetFill) {
								ctx.lineTo(prevXpos, xAxisPosY - zeroY);
								ctx.lineTo(xPos(i, frstpt, data), xAxisPosY - zeroY);
								ctx.lineTo(xPos(i, frstpt, data), yPos(i, frstpt));
								ctx.closePath();
								if (typeof data.datasets[i].fillColor == "function") ctx.fillStyle = data.datasets[i].fillColor("FILLCOLOR", data, config, i, -1, currentAnimPc.mainVal, -1, "Line", ctx, yAxisPosX, lmaxvalue[i], yAxisPosX + valueHop * (data.datasets[i].data.length - 1), lmaxvalue[i] - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * (lmaxvalue[i] - lminvalue[i]));
								else if (typeof data.datasets[i].fillColor == "string") ctx.fillStyle = data.datasets[i].fillColor;
								else ctx.fillStyle = config.defaultFillColor;
								ctx.fill();
							}
							ctx.beginPath();
							prevpt = -1;
							frstpt = -1;
							prevAnimPc = 0;
							prevnotempty = 0;
						} else {
							if (currentAnimPc.subVal > 0) {
								nxtnotmiss = -1;
								for (t = j + 1; t < data.datasets[i].data["length"] && nxtnotmiss == -1; t++) {
									if (!(typeof(data.datasets[i].data[t]) == 'undefined')) nxtnotmiss = t;
								}
								if ((typeof(data.datasets[i].data[j]) !== 'undefined') || (true == config.extrapolateMissingData)) {
									if (nxtnotmiss != -1) {
										prevXpos = xPos(i, j + currentAnimPc.subVal, data);
										if (config.bezierCurve) {
											ctx.bezierCurveTo(xPos(i, prevpt + (j + currentAnimPc.subVal - prevpt) / 2, data), yPos(i, prevpt), xPos(i, prevpt + (j + currentAnimPc.subVal - prevpt) / 2, data), yPos(i, nxtnotmiss), xPos(i, j + currentAnimPc.subVal, data), yPos(i, nxtnotmiss));
										} else {
											ctx.lineTo(xPos(i, j + currentAnimPc.subVal, data), yPos(i, j + 1));
										}
									}
								}
							}
						}
					}
				}
				ctx.stroke();
				if (config.datasetFill) {
					//				ctx.lineTo(yAxisPosX + (valueHop * (data.datasets[i].data.length - 1)), xAxisPosY - zeroY);
					ctx.lineTo(prevXpos, xAxisPosY - zeroY);
					ctx.lineTo(xPos(i, frstpt, data), xAxisPosY - zeroY);
					ctx.lineTo(xPos(i, frstpt, data), yPos(i, frstpt));
					ctx.closePath();
					if (typeof data.datasets[i].fillColor == "function") { ctx.fillStyle = data.datasets[i].fillColor("FILLCOLOR", data, config, i, -1, currentAnimPc.mainVal, -1, "Line", ctx, yAxisPosX, lmaxvalue[i], yAxisPosX + valueHop * (data.datasets[i].data.length - 1), lmaxvalue[i] - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * (lmaxvalue[i] - lminvalue[i])); }
					else if (typeof data.datasets[i].fillColor == "string") ctx.fillStyle = data.datasets[i].fillColor;
					else ctx.fillStyle = config.defaultFillColor;
					ctx.fill();
				} else {
					ctx.closePath();
				}
				if (config.pointDot) {
					if (typeof data.datasets[i].pointColor == "function") ctx.fillStyle = data.datasets[i].pointColor("POINTCOLOR", data, config, i, -1, animPc, -1, "Line", ctx, yAxisPosX, lmaxvalue[i], yAxisPosX + valueHop * (data.datasets[i].data.length - 1), lmaxvalue[i] - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * (lmaxvalue[i] - lminvalue[i]));
					else ctx.fillStyle = data.datasets[i].pointColor;
					if (typeof data.datasets[i].pointStrokeColor == "function") ctx.strokeStyle = data.datasets[i].pointStrokeColor("POINTSTROKECOLOR", data, config, i, -1, animPc, -1, "Line", ctx, yAxisPosX, lmaxvalue[i], yAxisPosX + valueHop * (data.datasets[i].data.length - 1), lmaxvalue[i] - ((config.animationLeftToRight) ? 1 : 1*currentAnimPc.mainVal) * (lmaxvalue[i] - lminvalue[i]));
					else ctx.strokeStyle = data.datasets[i].pointStrokeColor;
					ctx.lineWidth = config.pointDotStrokeWidth;
					for (var k = 0; k < data.datasets[i].data.length; k++) {
						if (!(typeof(data.datasets[i].data[k]) == 'undefined')) {
							var currentAnimPc = animationCorrection(animPc, data, config, i, k, 0);
							if (currentAnimPc.mainVal > 0 || !config.animationLeftToRight) {
								ctx.beginPath();
								ctx.arc(xPos(i, k, data), yPos(i, k), config.pointDotRadius, 0, Math.PI * 2, true);
								ctx.fill();
								ctx.stroke();
							}
						}
					}
				}
			}
		};

		function yPos(dataSet, iteration) {
			return xAxisPosY - zeroY - currentAnimPc.mainVal * (calculateOffset(logarithmic, data.datasets[dataSet].data[iteration], calculatedScale, scaleHop) - zeroY);
		};

		function xPos(ival, iteration, data) {
			if (typeof data.datasets[ival].xPos == "object") {
				if (!(typeof data.datasets[ival].xPos[Math.floor(iteration + 0.0001)] == "undefined")) {
					var width = valueHop * nbValueHop;
					var deb = (typeof data.xBegin != "undefined") ? data.xBegin : 1 * data.labels[0];
					var fin = (typeof data.xEnd != "undefined") ? data.xEnd : 1 * data.labels[data.labels.length - 1];
					if (fin <= deb) fin = deb + 100;
					if (1 * data.datasets[ival].xPos[Math.floor(iteration + 0.0001)] >= deb && data.datasets[ival].xPos[Math.floor(iteration + 0.0001)] <= fin) {
						var p1 = yAxisPosX + width * ((1 * data.datasets[ival].xPos[Math.floor(iteration + 0.0001)] - deb) / (fin - deb));
						var p2 = p1;
						if (Math.abs(iteration - Math.floor(iteration + 0.0001)) > 0.0001) {
							var tt = iteration + Math.floor(iteration + 0.0001);
							var p2 = xPos(ival, Math.ceil(iteration - 0.0001), data);
						}
						return p1 + (iteration - Math.floor(iteration + 0.0001)) * (p2 - p1);
					}
				}
			}
			return yAxisPosX + (valueHop * iteration);
		};
	}
749994
def draw_line(
            self, x0:float, y0:float, x1:float, y1:float, *,
            stroke:Color,
            stroke_width:float=1,
            stroke_dash:typing.Sequence=None
            ) -> None:
        """"""
        pass
406227
function drawLinearBarNeedle(context, options) {
    if (!options.needle) return;

    let {isVertical, width, length, barWidth, barOffset, barMargin,
        ticksLength, X, Y, ticksPadding} = context.barDimensions;
    let hasLeft = options.needleSide !== 'right';
    let hasRight = options.needleSide !== 'left';
    let position = ticksLength *
        (drawings.normalizedValue(options).indented - options.minValue) /
        (options.maxValue - options.minValue);
    let tickWidth = (options.ticksWidth / 100 + ticksPadding) * width;
    let baseLength = (barWidth / 2 + tickWidth);
    let needleLength = baseLength * (options.needleEnd / 100);
    let sX, eX, sY, eY;
    let draw = options.needleType.toLowerCase() === 'arrow' ?
        drawLinearArrowNeedle :
        drawLinearLineNeedle;
    let barStart = (width - barWidth) / 2;
    let needleStart = baseLength * (options.needleStart / 100);
    let nLeft = barStart - tickWidth - needleStart;
    let nRight = barStart + barWidth + tickWidth + needleStart;

    context.save();

    drawings.drawNeedleShadow(context, options);

    if (isVertical) {
        //noinspection JSUnresolvedFunction
        sY = round(Y + length - barMargin - barOffset - position);

        if (hasLeft) {
            //noinspection JSUnresolvedFunction
            sX = round(X + nLeft);
            eX = sX + needleLength;
            draw(context, options, sX, sY, eX, sY, needleLength);
        }

        if (hasRight) {
            //noinspection JSUnresolvedFunction
            sX = round(X + nRight);
            eX = sX - needleLength;
            draw(context, options, sX, sY, eX, sY, needleLength, true);
        }
    }

    else {
        //noinspection JSUnresolvedFunction
        sX = round(X + barMargin + barOffset + position);

        if (hasLeft) {
            //noinspection JSUnresolvedFunction
            sY = round(Y + nLeft);
            eY = sY + needleLength;
            draw(context, options, sX, sY, sX, eY, needleLength);
        }

        if (hasRight) {
            //noinspection JSUnresolvedFunction
            sY = round(Y + nRight);
            eY = sY - needleLength;
            draw(context, options, sX, sY, sX, eY, needleLength, true);
        }
    }

    context.restore();
}
254807
def drawPoints(self, pointPen, filterRedundantPoints=False):
        """"""
        if filterRedundantPoints:
            pointPen = FilterRedundantPointPen(pointPen)
        for contour in self.contours:
            pointPen.beginPath(identifier=contour["identifier"])
            for segmentType, pt, smooth, name, identifier in contour["points"]:
                pointPen.addPoint(pt=pt, segmentType=segmentType, smooth=smooth, name=name, identifier=identifier)
            pointPen.endPath()
        for component in self.components:
            pointPen.addComponent(component["baseGlyph"], component["transformation"], identifier=component["identifier"])
592599
def drawZigzag(self, p1, p2, breadth = 2):
        
        p1 = Point(p1)
        p2 = Point(p2)
        S = p2 - p1                             # vector start - end
        rad = abs(S)                            # distance of points
        cnt = 4 * int(round(rad / (4 * breadth), 0)) # always take full phases
        if cnt < 4:
            raise ValueError("points too close")
        mb = rad / cnt                          # revised breadth
        matrix = TOOLS._hor_matrix(p1, p2)      # normalize line to x-axis
        i_mat  = ~matrix                        # get original position
        points = []                             # stores edges
        for i in range (1, cnt):                
            if i % 4 == 1:                      # point "above" connection
                p = Point(i, -1) * mb
            elif i % 4 == 3:                    # point "below" connection
                p = Point(i, 1) * mb
            else:                               # ignore others
                continue
            points.append(p * i_mat)
        self.drawPolyline([p1] + points + [p2])  # add start and end points
        return p2
158804
function pointsArray (buf, offset, numPoints) {
    var pointsData = []
    for (var i = offset; i < offset + numPoints * 12; i += 12) {
      pointsData.push([buf.readFloatLE(i + 0), buf.readFloatLE(i + 4), buf.readFloatLE(i + 8)])
    }
    return pointsData
  }
1337168
private void drawPoints(Canvas canvas, Line line, int lineIndex, int mode) {
        pointPaint.setColor(line.getPointColor());
        int valueIndex = 0;
        for (PointValue pointValue : line.getValues()) {
            int pointRadius = ChartUtils.dp2px(density, line.getPointRadius());
            final float rawX = computator.computeRawX(pointValue.getX());
            final float rawY = computator.computeRawY(pointValue.getY());
            if (computator.isWithinContentRect(rawX, rawY, checkPrecision)) {
                // Draw points only if they are within contentRectMinusAllMargins, using contentRectMinusAllMargins
                // instead of viewport to avoid some
                // float rounding problems.
                if (MODE_DRAW == mode) {
                    drawPoint(canvas, line, pointValue, rawX, rawY, pointRadius);
                    if (line.hasLabels()) {
                        drawLabel(canvas, line, pointValue, rawX, rawY, pointRadius + labelOffset);
                    }
                } else if (MODE_HIGHLIGHT == mode) {
                    highlightPoint(canvas, line, pointValue, rawX, rawY, lineIndex, valueIndex);
                } else {
                    throw new IllegalStateException("Cannot process points in mode: " + mode);
                }
            }
            ++valueIndex;
        }
    }
966548
def write_d_pt(points = nil)
      return unless ptrue?(points)

      index = -1
      points.each do |point|
        index += 1
        next unless ptrue?(point)

        write_d_pt_point(index, point)
      end
    end
155776
def qcurve(self, vertexes, attr=0, row=None):
        ''
        assert len(vertexes) == 3, len(vertexes)
        x1, y1 = vertexes[0]
        x2, y2 = vertexes[1]
        x3, y3 = vertexes[2]

        self.point(x1, y1, attr, row)
        self._recursive_bezier(x1, y1, x2, y2, x3, y3, attr, row)
        self.point(x3, y3, attr, row)
1111842
function () {
			var series = this,
				dataMin = Number.MAX_VALUE,
				dataMax = Number.MIN_VALUE;
	
			series.generatePoints();
	
			each(series.data, function (point) {
				
				point.shapeType = 'path';
				point.shapeArgs = {
					d: series.translatePath(point.path)
				};
				
				// TODO: do point colors in drawPoints instead of point.init
				if (typeof point.y === 'number') {
					if (point.y > dataMax) {
						dataMax = point.y;
					} else if (point.y < dataMin) {
						dataMin = point.y;
					}
				}
			});
			
			series.translateColors(dataMin, dataMax);
		}