Beispiel #1
0
 public DicomEllipseGraphic()
 {
     base.Graphics.Add(_ellipse = new EllipsePrimitive());
     _points = new PointsList(this);
     _points.Add(PointF.Empty);
     _points.Add(PointF.Empty);
     _points.Add(PointF.Empty);
     _points.Add(PointF.Empty);
     _points.PointChanged += OnPointChanged;
 }
Beispiel #2
0
 protected override void SetPointCollection()
 {
     // do zaznaczania prostokata wystarcza dwa rogi
     PointsList.Clear();
     PointsList.Add(rect.TopLeft);       // lewy gorny
     PointsList.Add(rect.BottomRight);   // prawy dolny
 }
Beispiel #3
0
 public override void Update(PointF startP, PointF endP)
 {
     PointsList.Add(endP);
     PointsList[AnglesNumber - 1] = startP;
     PointsList[AnglesNumber]     = endP;
     AnglesNumber++;
 }
Beispiel #4
0
 protected override void SetPointCollection()
 {
     // do zaznaczenia trojkata potrzebne sa wszystkie 3 wierzcholki
     PointsList.Clear();
     PointsList.Add(PathFigure.StartPoint);    // lewy dolny
     PointsList.Add(line1.Point);              // prawy dolny
     PointsList.Add(line2.Point);              // gorny
 }
Beispiel #5
0
 internal HorizontalLine(ushort xLeft, ushort xRight, ushort y, char symbol)
 {
     plist = new List <Point>();
     for (ushort x = xLeft; x <= xRight; x++)
     {
         Point p = new Point(x, y, symbol);
         PointsList.Add(p);
     }
 }
Beispiel #6
0
 internal VerticalLine(ushort x, ushort yTop, ushort yBottom, char symbol)
 {
     plist = new List <Point>();
     for (ushort y = yTop; y <= yBottom; y++)
     {
         Point p = new Point(x, y, symbol);
         PointsList.Add(p);
     }
 }
Beispiel #7
0
        protected override void SetPointCollection()
        {
            // do zaznaczania elipsy wystarcza dwa rogi
            Rect rect = ((EllipseGeometry)adaptedGeometry).Bounds;// protokat w ktory jest "wpisana" elipsa

            PointsList.Clear();
            PointsList.Add(rect.TopLeft);     // lewy gorny
            PointsList.Add(rect.BottomRight); // prawy dolny
        }
Beispiel #8
0
        protected override void SetPointCollection()
        {
            // do zaznaczenia wielokata potrzebne sa wszystkie wierzcholki
            PointsList.Clear();
            PointsList.Add(PathFigure.StartPoint);

            foreach (LineSegment line in Lines)
            {
                PointsList.Add(line.Point);
            }
        }
Beispiel #9
0
 public void AddPeak()
 {
     if (Edge.EdgeNumber == 1)
     {
         PointsList.Add(TouchPoint);
     }
     else
     {
         PointsList.Insert(Edge.EdgeNumber - 1, TouchPoint);
     }
     AnglesNumber++;
 }
Beispiel #10
0
        /// <param name="linguisticVariableName">The name that identifies linguistic variable.</param>
        /// <param name="x0">The value of the (x0, 0) point.</param>
        /// <param name="x1">The value of the (x1, 1) point.</param>
        /// <param name="x2">The value of the (x2, 1) point.</param>
        /// <param name="x3">The value of the (x3, 0) point.</param>
        public TrapezoidalMembershipFunction(string linguisticVariableName, double x0, double x1, double x2, double x3) : base(linguisticVariableName)
        {
            if (x0 > x1 || x1 > x2 || x2 > x3)
            {
                throw new ArgumentException("Points order is violated.");
            }

            PointsList.Add(x0);
            PointsList.Add(x1);
            PointsList.Add(x2);
            PointsList.Add(x3);
        }
Beispiel #11
0
        public void CreatSubject()
        {
            for (int i = 0; i < NumberOfLine; i++)
            {
                var rectangle = new Rectangle
                {
                    Width  = 10,
                    Height = 110,
                    Fill   = new SolidColorBrush(Colors.White)
                };

                Point = new Point(225, -120);
                Canvas.SetLeft(rectangle, Point.X);
                Canvas.SetTop(rectangle, Point.Y);

                UIElements.Add(rectangle);
                PointsList.Add(Point);
            }
        }
Beispiel #12
0
        public override void CreatSubject()
        {
            for (int i = 0; i < NumberOfObjects; i++)
            {
                Image coinImage = new Image
                {
                    Width  = 20,
                    Height = 20,
                    Source = new BitmapImage(new Uri("Images/Coins/Coin.png", UriKind.Relative))
                };
                Xpoint = CommonMetheds.NewPoints();

                Point = new Point(Xpoint, 10);
                Canvas.SetLeft(coinImage, Point.X);
                Canvas.SetTop(coinImage, Point.Y);

                UIElements.Add(coinImage);
                PointsList.Add(Point);
            }
        }
Beispiel #13
0
        public override void CreatSubject()
        {
            for (int i = 0; i < NumberOfObjects; i++)
            {
                Point = new Point(CommonMetheds.NewPoints(), 10);

                Image policeImage = new Image
                {
                    Width   = 70,
                    Height  = 70,
                    Stretch = Stretch.Fill,
                    Source  = new BitmapImage(new Uri("Images/Obstacle/PoliceCar.png", UriKind.Relative))
                };

                Canvas.SetLeft(policeImage, Point.X);
                Canvas.SetTop(policeImage, Point.Y);

                UIElements.Add(policeImage);
                PointsList.Add(Point);
            }
        }
 public void Add(Point position)
 {
     PointsList.Add(position);
 }