public void IsZeroDegreeAcrossingAngleAreaTest() { AngleArea area = new AngleArea(359.9f, 10); bool ret = AngleArea.IsZeroDegreeAcrossingAngleArea(area); Assert.AreEqual(ret, true); //Assert.Fail(); }
public ISweepSectionView(AngleArea sweepSection, GraphicTrackDisplayer displayer) { _sweepAngleArea = sweepSection; _displayer = displayer; _antennaRangeAreaBrush = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 0, 0)); _antennaRangeAreaBrush.Opacity = 0.25f; _antennaRangeBorlderBrush = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 0, 0)); _antennaRangeBorlderBrush.Opacity = 1; _beginLinePoint = displayer.coordinateSystem.CalIntersectionPoint(sweepSection.BeginAngle); //gs.AddLine(_beginLinePoint); _endLinePoint = displayer.coordinateSystem.CalIntersectionPoint(sweepSection.EndAngle); }
public OverSweepSectionView(AngleArea sweepSection, GraphicTrackDisplayer displayer) : base(sweepSection, displayer) { _sweepSectionGraphic = displayer.Factory.CreatePathGeometry(); GeometrySink gs = _sweepSectionGraphic.Open(); gs.BeginFigure(displayer.coordinateSystem.OriginalPoint, FigureBegin.Filled); gs.AddLine(_beginLinePoint); //扇形的X轴Y轴半径是矩形框width的一半 SizeF size = new SizeF((float)displayer.coordinateSystem.CoordinateArea.Width / 2, (float)displayer.coordinateSystem.CoordinateArea.Height / 2); //添加弧线 ArcSegment arc = new ArcSegment(_endLinePoint, size, 0, SweepDirection.Clockwise, ArcSize.Small); gs.AddArc(arc); //添加第二条线 gs.AddLine(displayer.coordinateSystem.OriginalPoint); gs.EndFigure(FigureEnd.Closed); gs.Close(); _centerSectorBorder = displayer.Canvas.CreateSolidColorBrush(new ColorF(1, 1, 0)); }
internal abstract ISweepSectionView CreateSweepSwctionView(AngleArea sweepSection);
public AntennaSetSectionSweepModeCommand(float beginAngle, float endAngle) { _angleArea = new AngleArea(beginAngle, endAngle); }
public AntennaSetSectionSweepModeCommand(AngleArea area) { _angleArea = area; }
public SideViewSweepView(AngleArea sweepSection, GraphicTrackDisplayer displayer) : base(sweepSection, displayer) { }
internal override ISweepSectionView CreateSweepSwctionView(AngleArea sweepSection) { return(null); }
private void OnNewSweepSection(AngleArea area) => new AntennaSetSectionSweepModeCommand(area).Execute();