public TextDisplayEntity(int x, int y, int width, int height, OledFont font, DisplayVariable displayVariable) : base(x, y, width, height) { this.font = font; this.displayVariable = displayVariable; this.displayVariable.DisplayVariableUpdateEvent += this.Update; }
public CompassGraphDisplayEntity(int x, int y, int width, int height, DisplayVariable displayVariable) : base(x, y, width, height, displayVariable, false) { this.scaleFactor = this.Width / CompassGraphDisplayEntity.WidthInDegrees; this.centerpoint = 0; this.tickMin = -(WidthInDegrees / 2); this.tickMax = (WidthInDegrees / 2); this.tickPeriod = WidthInDegrees / 2; this.middlePixelX = this.X + (this.Width / 2); }
public LineGraphCompassDisplayEntity(int x, int y, int width, int height, DisplayVariable displayVariable) : base(x, y, width, height) { this.displayVariable = displayVariable; this.displayVariable.DisplayVariableUpdateEvent += this.Update; this.midpoint = this.X + (this.Width / 2); this.pos30 = midpoint + (this.Width / 6); this.neg30 = midpoint - (this.Width / 6); this.pos60 = midpoint + (this.Width / 3); this.neg60 = midpoint - (this.Width / 3); this.scaling = this.Width / 180; }
public FloatDisplayEntity(int x, int y, int width, int height, OledFont font, DisplayVariable displayVariable, double maxDecimal) : base(x, y, width, height, font, displayVariable) { this.maxDecimal = maxDecimal; }
/// <summary> /// Construct a new base for a VerticalLineGraphDisplayEntity /// </summary> /// <param name="x">left</param> /// <param name="y">top</param> /// <param name="width">width</param> /// <param name="height">height</param> /// <param name="displayVariable">the source display variable drawing on the graph</param> /// <param name="fFill">fill from the left to the middle?</param> /// <param name="tickPeriod"></param> public VerticalLineGraphDisplayEntityBase(int x, int y, int width, int height, DisplayVariable displayVariable, bool fFill) : base(x, y, width, height) { this.displayVariable = displayVariable; this.displayVariable.DisplayVariableUpdateEvent += this.Update; this.maxYOffset = height - VerticalLineGraphDisplayEntity.HashHeight - 1; this.dataPoints = new int[maxYOffset]; this.dataPointsOriginal = new double[maxYOffset]; this.fFill = fFill; for (int i = 0; i < this.dataPoints.Length; i++) { this.dataPoints[i] = -1; this.dataPointsOriginal[i] = 0; } }
public VerticalLineGraphDisplayEntity(int x, int y, int width, int height, double min, double max, DisplayVariable displayVariable, bool fFill, double tickPeriod) : base(x, y, width, height, displayVariable, fFill) { this.scaleFactor = this.Width / (max - min); this.min = min; this.max = max; this.tickPeriod = tickPeriod; }