public void DrawDot(GraphicTrackDisplayer displayer, GraphicTargetDotView view) { if (!displayer.coordinateSystem.PointOutOfRange(CoordinateSystem.Point2FToPoint(view.Position))) { Ellipse e = new Ellipse(view.Position, targetViewRadius, targetViewRadius); displayer.Canvas.FillEllipse(e, targetViewBrush); } }
public CoordinateTargetViewManager(GraphicTrackDisplayer displayer) : base(displayer) { //鼠标点击事件 displayer.DisplayControl.MouseClick += DisplayControl_MouseClick; InitializeBitmaps(); //读取所有目标 LoadTargetViews(targetProvider.GetTargetTracks()); LoadTargetViews(targetProvider.GetTargetDots()); DrawSectors(); }
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)); }
public SideViewSweepView(AngleArea sweepSection, GraphicTrackDisplayer displayer) : base(sweepSection, displayer) { }
public SweepSectionManager(GraphicTrackDisplayer displayer) { this.displayer = displayer; sweepModeSubject = TargetManagerFactory.CreateSweepModeSubject(); sweepModeSubject.RegisterSweepModeObserver(this); }