Esempio n. 1
0
        internal bool Add(Line line)
        {
            LineSegment lineSegment = new LineSegment(new PointF(line.x1 * 3.0F + 10.0F, line.y1 * 3.0F + 10.0F), new PointF(line.x2 * 3.0F + 10.0F, line.y2 * 3.0F + 10.0F));

            lineSegment.IsDecorationSegment = true;

            if ((shapeSegments != null) && (shapeSegments.Count > 0) && (shapeSegments[shapeSegments.Count - 1] is LineSegment))
            {
                LineSegment oldLineSegment = shapeSegments[shapeSegments.Count - 1] as LineSegment;
                if (oldLineSegment.GetEndPoint() == lineSegment.GetStartPoint())
                {
                    shapeSegments.Add(lineSegment);
                    return(true);
                }
            }
            return(false);
        }