예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="shape"></param>
        public override void Move(BaseShape shape)
        {
            var arc = shape as XArc;
            var a   = WpfArc.FromXArc(arc, 0, 0);

            if (_ellipse != null)
            {
                _ellipse.TopLeft.X     = a.P1.X;
                _ellipse.TopLeft.Y     = a.P1.Y;
                _ellipse.BottomRight.X = a.P2.X;
                _ellipse.BottomRight.Y = a.P2.Y;
            }

            if (_startLine != null)
            {
                _startLine.Start.X = a.Center.X;
                _startLine.Start.Y = a.Center.Y;
                _startLine.End.X   = a.Start.X;
                _startLine.End.Y   = a.Start.Y;
            }

            if (_endLine != null)
            {
                _endLine.Start.X = a.Center.X;
                _endLine.Start.Y = a.Center.Y;
                _endLine.End.X   = a.End.X;
                _endLine.End.Y   = a.End.Y;
            }

            if (_p1HelperPoint != null)
            {
                _p1HelperPoint.X = a.P1.X;
                _p1HelperPoint.Y = a.P1.Y;
            }

            if (_p2HelperPoint != null)
            {
                _p2HelperPoint.X = a.P2.X;
                _p2HelperPoint.Y = a.P2.Y;
            }

            if (_centerHelperPoint != null)
            {
                _centerHelperPoint.X = a.Center.X;
                _centerHelperPoint.Y = a.Center.Y;
            }

            if (_startHelperPoint != null)
            {
                _startHelperPoint.X = a.Start.X;
                _startHelperPoint.Y = a.Start.Y;
            }

            if (_endHelperPoint != null)
            {
                _endHelperPoint.X = a.End.X;
                _endHelperPoint.Y = a.End.Y;
            }
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="shape"></param>
        public override void Finalize(BaseShape shape)
        {
            var arc = shape as XArc;
            var a   = WpfArc.FromXArc(arc, 0, 0);

            if (!_connectedP3)
            {
                arc.Point3.X = a.Start.X;
                arc.Point3.Y = a.Start.Y;
            }

            if (!_connectedP4)
            {
                arc.Point4.X = a.End.X;
                arc.Point4.Y = a.End.Y;
            }
        }