public RTLevel() { _title = "level"; _titlePos = GraphicsUtil.TextAlignment.left; _titleColor = Color.DimGray; titleBrush = new SolidBrush(_titleColor); _titleFont = new Font(FontFamily.GenericSansSerif, 8); _displaySize = new Size(50, 10); _valuePos = GraphicsUtil.TextAlignment.below; _valueFont = new Font(FontFamily.GenericSansSerif, 8); _valueColor = Color.DimGray; valueBrush = new SolidBrush(_valueColor); _format = "F2"; _unit = ""; _value = 0; _min = -1; _max = 1; _openAngle = 150; _frameColor = Color.DimGray; framePen = new Pen(_frameColor); _fillColor = Color.LimeGreen; fillBrush = new SolidBrush(_fillColor); _pointColor = Color.Red; pointPen = new Pen(_pointColor); _levelType = RTLevelType.LinearH; _logScale = false; gridCalculator = new GridCalculator(_min, _max, _logScale, 2 * Vector.V(displaySize).Len); gridCalculator.reScreen(-openAngle / 2, openAngle / 2); this.DoubleBuffered = true; }
void getWfCoords(ref Vector wfCenter, ref Vector wfSize, ref GraphicsUtil.TextPosition titlePosition) { GraphicsUtil.TextAlignment ta = _titlePos; if ((_title == null) || (_title.Length < 1)) { ta = GraphicsUtil.TextAlignment.off; } Size sz = new Size(_displaySize.Width + 4, _displaySize.Height + 4); wfSize = Vector.V(_displaySize) * scale; GraphicsUtil.dualSplit(ClientSize, sz, scale, ref wfCenter, ref titlePosition, _titlePos); }
public RTWaterfall() { _title = "Waterfall"; _titlePos = GraphicsUtil.TextAlignment.above; _titleColor = Color.DimGray; titleBrush = new SolidBrush(_titleColor); _titleFont = new Font(FontFamily.GenericSansSerif, 8); _displaySize = new Size(50, 20); _frameColor = Color.DimGray; framePen = new Pen(_frameColor); _colorSet = "KrYW"; _timeSteps = 64; _ySteps = 16; _bipolar = false; newColorSet(); newDataSet(); this.DoubleBuffered = true; }
public RTFlexInput() { _title = "Input"; _titleFont = new Font(FontFamily.GenericSansSerif, 8); _titleColor = Color.DimGray; _titlePos = GraphicsUtil.TextAlignment.above; _valueSize = new Size(80, 20); _minVal = -1; _maxVal = 1; _floatVal = 0; _intVal = 0; _stringVal = ""; _inputType = RTFlexInputType.String; _format = "F2"; _unit = ""; _drawFrame = true; _frameColor = Color.DimGray; _valueColor = Color.DimGray; _valueFont = new Font(FontFamily.GenericSansSerif, 8); }
public RTXY() { _title = "XY"; _titlePos = GraphicsUtil.TextAlignment.above; _titleColor = Color.DimGray; titleBrush = new SolidBrush(_titleColor); _titleFont = new Font(FontFamily.GenericSansSerif, 8); _displaySize = new Size(50, 20); _frameColor = Color.DimGray; framePen = new Pen(_frameColor); _colorSet = "KrYW"; _xSteps = 64; _ySteps = 64; _fadeFactor = 0.8; newFadeMap(); newColorSet(); newDataSet(); updateBitmap(); this.DoubleBuffered = true; }
void getLevelCoords(ref Vector levelCenter, ref GraphicsUtil.TextPosition titlePosition, ref GraphicsUtil.TextPosition valuePosition, ref Vector dim) { switch (_levelType) { case RTLevelType.Off: dim = Vector.Zero; break; case RTLevelType.LinearH: case RTLevelType.LinearV: case RTLevelType.Rotary: dim = Vector.V(displaySize) * scale; break; } GraphicsUtil.TextAlignment ta = _titlePos; if ((_title == null) || (_title.Length < 1)) { ta = GraphicsUtil.TextAlignment.off; } GraphicsUtil.tripleSplit(ClientSize, _displaySize, scale, ref levelCenter, ref titlePosition, ta, ref valuePosition, _valuePos); }