Ejemplo n.º 1
0
        public LineSegment(int id, SlopedLine l, Coord from, Coord to, SegmentType type, LineDirection direction)
        {
            if (type == SegmentType.Slope && from != to)
            {
                throw new ArgumentException("Slopes can only be size 1");
            }

            Id        = id;
            Origin    = l;
            From      = from;
            To        = to;
            Type      = type;
            Direction = direction;
        }
Ejemplo n.º 2
0
 public LineSegment(SlopedLine l, Coord from, Coord to, SegmentType type, LineDirection direction)
     : this(PaintAbles.Id++, l, from, to, type, direction)
 {
 }
Ejemplo n.º 3
0
 public LineSegment(int id, SlopedLine l, Coord from, Coord to, SegmentType type)
     : this(id, l, from, to, type, Vector.GetDirection(from, to))
 {
 }
Ejemplo n.º 4
0
 public LineSegment(SlopedLine l, Coord from, Coord to, SegmentType type)
     : this(PaintAbles.Id++, l, from, to, type, Vector.GetDirection(from, to))
 {
 }