Configures the start, control, and end points for this curve.
552129
public void setCurve (float x1, float y1, float ctrlx, float ctrly, float x2, float y2) {
        this.x1 = x1;
        this.y1 = y1;
        this.ctrlx = ctrlx;
        this.ctrly = ctrly;
        this.x2 = x2;
        this.y2 = y2;
    }
172037
function(n) {
      // Fitting to the curve is too costly, we compute a larger bounding box
      // using the control points:
      var cp = sigma.utils.getSelfLoopControlPoints(n.x, n.y, n.size);

      // Bounding box of the point and the two control points:
      var minX = Math.min(n.x, cp.x1, cp.x2),
          maxX = Math.max(n.x, cp.x1, cp.x2),
          minY = Math.min(n.y, cp.y1, cp.y2),
          maxY = Math.max(n.y, cp.y1, cp.y2);

      return {
        x1: minX - n.size,
        y1: minY - n.size,
        x2: maxX + n.size,
        y2: minY - n.size,
        height: maxY - minY + n.size * 2
      };
    }
1236745
protected void setEndPoints() {
		for (int i = 0; i < rayNum; i++) {
			float angle = direction + coneDegree - 2f * coneDegree * i
					/ (rayNum - 1f);
			final float s = sin[i] = MathUtils.sinDeg(angle);
			final float c = cos[i] = MathUtils.cosDeg(angle);
			endX[i] = distance * c;
			endY[i] = distance * s;
		}
	}
638655
void bezierTo(Point2D controlPoint1, Point2D controlPoint2, Point2D endPoint) {
		m_impl.bezierTo(controlPoint1, controlPoint2, endPoint);
	}
1336835
public void setupControlDesc()
    {
        if (m_screenParent == null)
            return;
        String strDisplay = m_converterField.getFieldDesc();
        if ((strDisplay != null) && (strDisplay.length() > 0))
        {
            ScreenLocation descLocation = m_screenParent.getNextLocation(ScreenConstants.FIELD_DESC, ScreenConstants.DONT_SET_ANCHOR);
            new SStaticString(descLocation, m_screenParent, strDisplay);
        }
    }
69958
void setEndPoints() {
		float angleNum = 360f / (rayNum - 1);
		for (int i = 0; i < rayNum; i++) {
			final float angle = angleNum * i;
			sin[i] = MathUtils.sinDeg(angle);
			cos[i] = MathUtils.cosDeg(angle);
			endX[i] = distance * cos[i];
			endY[i] = distance * sin[i];
		}
	}
752878
protected void initControlListeners() {
        // if the control got resized the overlay rect must be rest
        control.layoutBoundsProperty().addListener(observable -> resetRippler());
        if(getChildren().contains(control))
            control.boundsInParentProperty().addListener(observable -> resetRippler());
        control.addEventHandler(MouseEvent.MOUSE_PRESSED,
            (event) -> createRipple(event.getX(), event.getY()));
        // create fade out transition for the ripple
        control.addEventHandler(MouseEvent.MOUSE_RELEASED, e -> releaseRipple());
    }
1178684
private void configure( int width , int height ) {

		this.imageWidth = width;
		this.imageHeight = height;

		// adjust size based parameters based on image size
		this.minimumContour = minimumContourConfig.computeI(Math.min(width,height));
		this.minimumContour = Math.max(4,minimumContour); // This is needed to avoid processing zero or other impossible
		this.minimumArea = Math.pow(this.minimumContour /4.0,2);
		contourFinder.setMinContour(minimumContour);

		if( helper != null )
			helper.setImageShape(width,height);
	}
1362463
function () {
			var series = this,
				yAxis = series.yAxis,
				plotHigh;

			colProto.translate.apply(series);

			// Set plotLow and plotHigh
			each(series.points, function (point) {
				var shapeArgs = point.shapeArgs,
					minPointLength = series.options.minPointLength,
					heightDifference,
					height,
					y;

				point.tooltipPos = null; // don't inherit from column
				point.plotHigh = plotHigh = yAxis.translate(point.high, 0, 1, 0, 1);
				point.plotLow = point.plotY;

				// adjust shape
				y = plotHigh;
				height = point.plotY - plotHigh;

				if (height < minPointLength) {
					heightDifference = (minPointLength - height);
					height += heightDifference;
					y -= heightDifference / 2;
				}
				shapeArgs.height = height;
				shapeArgs.y = y;
			});
		}
248089
private void buildVertexes()
	{
		vertexes.clear();
		if (controlPoints.size() == 0)
			return;

		double step = 1D / (precision + 1);
		double t = 0;
		vertexes.add(controlPoints.get(0));
		for (int i = 1; i <= precision; i++)
		{
			t = i * step;
			vertexes.add(i, interpolateAll(controlPoints, controlPoints.size() - 1, 0, t));
		}
		vertexes.add(controlPoints.get(controlPoints.size() - 1));

		dirty = false;
	}
441214
protected function configurePipeline(): void
    {
        $this->pipeline = new Pipeline($this->findReplaceFactory);
        $this->registerReplaceName();
        $this->registerReplaceProjectRootNamespace();
    }
294778
function curve($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3) {
    // in the current line style, draw a bezier curve from (x0,y0) to (x3,y3) using the other two points
    // as the control points for the curve.
    $this->objects[$this->currentContents]['c'] .=
      sprintf("\n%.3F %.3F m %.3F %.3F %.3F %.3F %.3F %.3F c S", $x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3);
  }
739278
function setPoints(points) {
         var x = Infinity,
             y = Infinity,
             right = -Infinity,
             bottom = -Infinity;
         points.forEach(function (point) {
           x = Math.min(x, point.x);
           y = Math.min(y, point.y);
           right = Math.max(right, point.x);
           bottom = Math.max(bottom, point.y);
         });
         this.setShape(x, y, right - x, bottom - y);
         return this;
       }
1027123
private void init() {
        _minValue                           = 0;
        _maxValue                           = 100;
        value                               = new DoublePropertyBase(_minValue) {
            @Override protected void invalidated() {
                final double VALUE = get();
                withinSpeedLimit = !(Instant.now().minusMillis(getAnimationDuration()).isBefore(lastCall));
                lastCall = Instant.now();
                if (isAnimated() && withinSpeedLimit) {
                    long animationDuration = isReturnToZero() ? (long) (0.2 * getAnimationDuration()) : getAnimationDuration();
                    timeline.stop();

                    final KeyValue KEY_VALUE;
                    if (NeedleBehavior.STANDARD == getNeedleBehavior()) {
                        KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                    } else { // Optimized only useful in a gauge where the angle range is 360 deg and the shorter way has to be calculated.
                        double ov         = getOldValue();
                        double min        = getMinValue();
                        double max        = getMaxValue();
                        double halfRange  = getRange() * 0.5;
                        double cv         = getCurrentValue();
                        double delta      = VALUE - getCurrentValue();

                        if (delta < -halfRange) {
                            double kv1 = max - cv;
                            double kv2 = VALUE;
                        } else if (delta > halfRange) {

                        }

                        double tmpValue;

                        if (Math.abs(VALUE - ov) > getRange() * 0.5) {
                            if (ov < VALUE) {
                                tmpValue = min - max + VALUE;
                            } else {
                                tmpValue = ov + max - ov + min + VALUE - getRange();
                            }
                            KEY_VALUE = new KeyValue(currentValue, tmpValue, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                        } else {
                            if (cv < min) currentValue.set(max + cv);
                            KEY_VALUE = new KeyValue(currentValue, VALUE, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                        }
                    }
                    final KeyFrame KEY_FRAME = new KeyFrame(Duration.millis(animationDuration), KEY_VALUE);
                    timeline.getKeyFrames().setAll(KEY_FRAME);
                    timeline.play();
                } else {
                    currentValue.set(VALUE);
                    fireUpdateEvent(FINISHED_EVENT);
                }
                if (isAveragingEnabled()) { movingAverage.addData(new Data(VALUE)); }
            }
            @Override public void set(final double VALUE) {
                super.set(VALUE);
                fireUpdateEvent(VALUE_EVENT);
            }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "value"; }
        };
        oldValue                            = new SimpleDoubleProperty(Gauge.this, "oldValue", value.get());
        currentValue                        = new DoublePropertyBase(value.get()) {
            @Override protected void invalidated() {
                final double VALUE = get();
                if (isCheckThreshold()) {
                    double thrshld = getThreshold();
                    if (formerValue.get() < thrshld && VALUE > thrshld) {
                        fireEvent(EXCEEDED_EVENT);
                    } else if (formerValue.get() > thrshld && VALUE < thrshld) {
                        fireEvent(UNDERRUN_EVENT);
                    }
                }
                if (VALUE < getMinMeasuredValue()) {
                    setMinMeasuredValue(VALUE);
                } else if (VALUE > getMaxMeasuredValue()) {
                    setMaxMeasuredValue(VALUE);
                }
                formerValue.set(VALUE);
            }
            @Override public void set(final double VALUE) { super.set(VALUE); }
            @Override public Object getBean() { return Gauge.this; }
            @Override public String getName() { return "currentValue";}
        };
        formerValue                         = new SimpleDoubleProperty(Gauge.this, "formerValue", value.get());
        _range                              = _maxValue - _minValue;
        _threshold                          = _maxValue;
        _title                              = "";
        _subTitle                           = "";
        _unit                               = "";
        _averagingEnabled                   = false;
        _averagingPeriod                    = 10;
        movingAverage                       = new MovingAverage(_averagingPeriod);
        sections                            = FXCollections.observableArrayList();
        areas                               = FXCollections.observableArrayList();
        tickMarkSections                    = FXCollections.observableArrayList();
        tickLabelSections                   = FXCollections.observableArrayList();
        markers                             = FXCollections.observableArrayList();

        _startFromZero                      = false;
        _returnToZero                       = false;
        _zeroColor                          = DARK_COLOR;
        _minMeasuredValue                   = _maxValue;
        _maxMeasuredValue                   = _minValue;
        _minMeasuredValueVisible            = false;
        _maxMeasuredValueVisible            = false;
        _oldValueVisible                    = false;
        _valueVisible                       = true;
        _backgroundPaint                    = Color.TRANSPARENT;
        _borderPaint                        = Color.TRANSPARENT;
        _borderWidth                        = 1;
        _foregroundPaint                    = Color.TRANSPARENT;
        _knobColor                          = Color.rgb(204, 204, 204);
        _knobType                           = KnobType.STANDARD;
        _knobPosition                       = Pos.CENTER;
        _knobVisible                        = true;
        _animated                           = false;
        animationDuration                   = 800;
        _startAngle                         = 320;
        _angleRange                         = 280;
        _angleStep                          = _angleRange / _range;
        _autoScale                          = true;
        _shadowsEnabled                     = false;
        _barEffectEnabled                   = false;
        _scaleDirection                     = ScaleDirection.CLOCKWISE;
        _tickLabelLocation                  = TickLabelLocation.INSIDE;
        _tickLabelOrientation               = TickLabelOrientation.HORIZONTAL;
        _tickLabelColor                     = DARK_COLOR;
        _tickMarkColor                      = DARK_COLOR;
        _majorTickMarkColor                 = DARK_COLOR;
        _majorTickMarkLengthFactor          = 0.42;
        _majorTickMarkWidthFactor           = 0.275;
        _mediumTickMarkColor                = DARK_COLOR;
        _mediumTickMarkLengthFactor         = 0.41;
        _mediumTickMarkWidthFactor          = 0.175;
        _minorTickMarkColor                 = DARK_COLOR;
        _minorTickMarkLengthFactor          = 0.40;
        _minorTickMarkWidthFactor           = 0.1125;
        _majorTickMarkType                  = TickMarkType.LINE;
        _mediumTickMarkType                 = TickMarkType.LINE;
        _minorTickMarkType                  = TickMarkType.LINE;
        _locale                             = Locale.US;
        _decimals                           = 1;
        _tickLabelDecimals                  = 0;
        _needleType                         = NeedleType.STANDARD;
        _needleShape                        = NeedleShape.ANGLED;
        _needleSize                         = NeedleSize.STANDARD;
        _needleBehavior                     = NeedleBehavior.STANDARD;
        _needleColor                        = Color.rgb(200, 0, 0);
        _needleBorderColor                  = Color.TRANSPARENT;
        _barColor                           = BRIGHT_COLOR;
        _barBorderColor                     = Color.TRANSPARENT;
        _barBackgroundColor                 = DARK_COLOR;
        _lcdDesign                          = LcdDesign.STANDARD;
        _lcdFont                            = LcdFont.DIGITAL_BOLD;
        _ledColor                           = Color.RED;
        _ledType                            = LedType.STANDARD;
        _titleColor                         = DARK_COLOR;
        _subTitleColor                      = DARK_COLOR;
        _unitColor                          = DARK_COLOR;
        _valueColor                         = DARK_COLOR;
        _thresholdColor                     = Color.CRIMSON;
        _averageColor                       = Color.MAGENTA;
        _checkSectionsForValue              = false;
        _checkAreasForValue                 = false;
        _checkThreshold                     = false;
        _innerShadowEnabled                 = false;
        _thresholdVisible                   = false;
        _averageVisible                     = false;
        _sectionsVisible                    = false;
        _sectionsAlwaysVisible              = false;
        _sectionTextVisible                 = false;
        _sectionIconsVisible                = false;
        _highlightSections                  = false;
        _areasVisible                       = false;
        _areaTextVisible                    = false;
        _areaIconsVisible                   = false;
        _highlightAreas                     = false;
        _tickMarkSectionsVisible            = false;
        _tickLabelSectionsVisible           = false;
        _markersVisible                     = false;
        _tickLabelsVisible                  = true;
        _onlyFirstAndLastTickLabelVisible   = false;
        _majorTickMarksVisible              = true;
        _mediumTickMarksVisible             = true;
        _minorTickMarksVisible              = true;
        _tickMarkRingVisible                = false;
        _majorTickSpace                     = 10;
        _minorTickSpace                     = 1;
        _lcdVisible                         = false;
        _lcdCrystalEnabled                  = false;
        _ledVisible                         = false;
        _ledOn                              = false;
        _ledBlinking                        = false;
        _orientation                        = Orientation.HORIZONTAL;
        _gradientBarEnabled                 = false;
        _customTickLabelsEnabled            = false;
        customTickLabels                    = FXCollections.observableArrayList();
        _customTickLabelFontSize            = 18;
        _interactive                        = false;
        _buttonTooltipText                  = "";
        _keepAspect                         = true;
        _customFontEnabled                  = false;
        _customFont                         = Fonts.robotoRegular(12);
        _alert                              = false;
        _alertMessage                       = "";
        _smoothing                          = false;
        formatString                        = "%.2f";

        originalMinValue                    = -Double.MAX_VALUE;
        originalMaxValue                    = Double.MAX_VALUE;
        originalThreshold                   = Double.MAX_VALUE;
        lastCall                            = Instant.now();
        timeline                            = new Timeline();
        timeline.setOnFinished(e -> {
            if (isReturnToZero() && Double.compare(currentValue.get(), 0.0) != 0.0) {
                final KeyValue KEY_VALUE2 = new KeyValue(value, 0, Interpolator.SPLINE(0.5, 0.4, 0.4, 1.0));
                final KeyFrame KEY_FRAME2 = new KeyFrame(Duration.millis((long) (0.8 * getAnimationDuration())), KEY_VALUE2);
                timeline.getKeyFrames().setAll(KEY_FRAME2);
                timeline.play();
            }
            fireUpdateEvent(FINISHED_EVENT);
        });
    }
905585
private void initPatternControllers() {

        m_patternControllers.put(PatternType.NONE, new CmsPatternPanelNoneController());
        m_patternControllers.put(PatternType.DAILY, new CmsPatternPanelDailyController(m_model, this));
        m_patternControllers.put(PatternType.WEEKLY, new CmsPatternPanelWeeklyController(m_model, this));
        m_patternControllers.put(PatternType.MONTHLY, new CmsPatternPanelMonthlyController(m_model, this));
        m_patternControllers.put(PatternType.YEARLY, new CmsPatternPanelYearlyController(m_model, this));
        // m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this));
    }
1203119
def _setup(self):
        

        # Create a root system ticks and user configurable ticks
        systick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)
        fasttick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)
        user1tick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)
        user2tick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)

        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(system_tick, systick))
        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(fast_tick, fasttick))
        self.sensor_graph.add_config(SlotIdentifier.FromString('controller'), config_fast_tick_secs, 'uint32_t', 1)

        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(tick_1, user1tick))
        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(tick_2, user2tick))
        self.system_tick = systick
        self.fast_tick = fasttick
        self.user1_tick = user1tick
        self.user2_tick = user2tick
1052313
public void setY(float y) {
    	if (y != this.y) {
    		float dy = y - this.y;
	        this.y = y;

	        if ((points == null) || (center == null)) {
	        	checkPoints();
	        }
	        // update the points in the special case
    		for (int i=0;i<points.length/2;i++) {
    			points[(i*2)+1] += dy;
    		}
    		center[1] += dy;
    		y += dy;
    		maxY += dy;
    		minY += dy;
	        trianglesDirty = true;
    	}
    }