/// <summary>
 /// Default ctor
 /// </summary>
 /// <param name="s">The s.</param>
 /// <param name="points">The points.</param>
 /// <param name="curveType">Type of the curve.</param>
 public MultiPointShape(IModel s, Point[] points, MultiPointType curveType)
     : base(s)
 {
     mPoints    = points;
     mCurveType = curveType;
     CalculateRectangle();
 }
 /// <summary>
 /// Default ctor
 /// </summary>
 /// <param name="s">The s.</param>
 /// <param name="points">The points.</param>
 /// <param name="curveType">Type of the curve.</param>
 public MultiPointShape(IModel s, Point[] points, MultiPointType curveType)
     : base(s)
 {
     mPoints = points;
     mCurveType = curveType;
     CalculateRectangle();
 }
 /// <summary>
 /// Default ctor
 /// </summary>
 /// <param name="s">The s.</param>
 /// <param name="points">The points.</param>
 /// <param name="curveType">Type of the curve.</param>
 public MultiPointShape(IModel s, Point[] points, MultiPointType curveType)
     : base(s)
 {
     this.mPaintStyle = new SolidPaintStyle(Color.Transparent);
     this.mPenStyle   = new PenStyle(Color.Black, DashStyle.Solid, 1);
     mPoints          = points;
     mCurveType       = curveType;
     CalculateRectangle();
 }
Exemple #4
0
        public static MultiPointType ToGmlMultiPoint(this MultiPoint multiPoint)
        {
            MultiPointType           gmlMultiPoint   = new MultiPointType();
            List <PointPropertyType> gmlPointMembers = new List <PointPropertyType>();

            foreach (var point in multiPoint.Points)
            {
                PointPropertyType gmlPointMember = new PointPropertyType();
                gmlPointMember.Point = ToGmlPoint(point);
                gmlPointMembers.Add(gmlPointMember);
            }
            gmlMultiPoint.pointMember = gmlPointMembers.ToArray();
            return(gmlMultiPoint);
        }
Exemple #5
0
        public override void PaintGhostLine(MultiPointType curveType, Point[] points)
        {
            switch (curveType)
            {
            case MultiPointType.Straight:
                Ghost = GhostsFactory.GetGhost(points, GhostTypes.MultiLine);
                break;

            case MultiPointType.Polygon:
                Ghost = GhostsFactory.GetGhost(points, GhostTypes.Polygon);
                break;

            case MultiPointType.Curve:
                Ghost = GhostsFactory.GetGhost(points, GhostTypes.CurvedLine);
                break;
            }
        }
Exemple #6
0
        public static MultiPoint ToGeometry(this MultiPointType gmlMultipoint)
        {
            List <IPosition> points = new List <IPosition>();

            if (gmlMultipoint.pointMember != null)
            {
                foreach (var member in gmlMultipoint.pointMember)
                {
                    points.Add(member.Point.ToGeometry().Position);
                }
            }

            if (gmlMultipoint.pointMembers != null)
            {
                foreach (var member in gmlMultipoint.pointMembers.Point)
                {
                    points.Add(member.ToGeometry().Position);
                }
            }

            return(new MultiPoint(points));
        }
Exemple #7
0
        public override void PaintGhostLine(
            MultiPointType curveType,
            Point[] points)
        {
            // Refresh the old ghost area if needed.
            this.InvalidateGhostArea();

            switch (curveType)
            {
            case MultiPointType.Straight:
                Ghost = GhostsFactory.GetGhost(points, GhostTypes.MultiLine, this);
                break;

            case MultiPointType.Polygon:
                Ghost = GhostsFactory.GetGhost(points, GhostTypes.Polygon, this);
                break;

            case MultiPointType.Curve:
                Ghost = GhostsFactory.GetGhost(points, GhostTypes.CurvedLine, this);
                break;
            }
        }
Exemple #8
0
        public static MultiPoint ToGeometry(this MultiPointType gmlMultipoint)
        {
            List <Point> points = new List <Point>();

            if (gmlMultipoint.pointMember != null)
            {
                foreach (var member in gmlMultipoint.pointMember)
                {
                    points.Add(new Point(member.Point.ToGeometry().Coordinates));
                }
            }

            if (gmlMultipoint.pointMembers != null)
            {
                foreach (var member in gmlMultipoint.pointMembers)
                {
                    points.Add(new Point(member.ToGeometry().Coordinates));
                }
            }

            return(new MultiPoint(points));
        }
 public static MultiPointType ToGmlMultiPoint(this MultiPoint multiPoint)
 {
     MultiPointType gmlMultiPoint = new MultiPointType();
     List<PointPropertyType> gmlPointMembers = new List<PointPropertyType>();
     foreach (var point in multiPoint.Points) {
         PointPropertyType gmlPointMember = new PointPropertyType();
         gmlPointMember.Point = ToGmlPoint(point);
         gmlPointMembers.Add(gmlPointMember);
     }
     gmlMultiPoint.pointMember = gmlPointMembers.ToArray();
     return gmlMultiPoint;
 }
 /// <summary>
 /// Default ctor
 /// </summary>
 /// <param name="s">The s.</param>
 /// <param name="points">The points.</param>
 /// <param name="curveType">Type of the curve.</param>
 public MultiPointShape(IModel s, Point[] points, MultiPointType curveType)
     : base(s)
 {
     this.mPaintStyle = new SolidPaintStyle(Color.Transparent);
     this.mPenStyle = new PenStyle(Color.Black, DashStyle.Solid, 1);
     mPoints = points;
     mCurveType = curveType;
     CalculateRectangle();
 }
Exemple #11
0
        public override void PaintGhostLine(MultiPointType curveType, Point[] points)
        {
            switch(curveType)
            {
                case MultiPointType.Straight:
                    Ghost = GhostsFactory.GetGhost(points, GhostTypes.MultiLine);
                    break;
                case MultiPointType.Polygon:
                    Ghost = GhostsFactory.GetGhost(points, GhostTypes.Polygon);
                    break;
                case MultiPointType.Curve:
                    Ghost = GhostsFactory.GetGhost(points, GhostTypes.CurvedLine);
                    break;

            }
        }
 /// <summary>
 /// Paints the ghost line.
 /// </summary>
 /// <param name="curveType">Type of the curve.</param>
 /// <param name="points">The points.</param>
 public virtual void PaintGhostLine(MultiPointType curveType, Point[] points)
 {
 }
 /// <summary>
 /// Paints the ghost line.
 /// </summary>
 /// <param name="curveType">Type of the curve.</param>
 /// <param name="points">The points.</param>
 public virtual void PaintGhostLine(MultiPointType curveType, Point[] points)
 {
 }
Exemple #14
0
    public override void PaintGhostLine(
        MultiPointType curveType,
        Point[] points) {
      // Refresh the old ghost area if needed.
      this.InvalidateGhostArea();

      switch (curveType) {
        case MultiPointType.Straight:
          Ghost = GhostsFactory.GetGhost(points, GhostTypes.MultiLine, this);
          break;
        case MultiPointType.Polygon:
          Ghost = GhostsFactory.GetGhost(points, GhostTypes.Polygon, this);
          break;
        case MultiPointType.Curve:
          Ghost = GhostsFactory.GetGhost(points, GhostTypes.CurvedLine, this);
          break;

      }
    }