private bool CanRotate(double angle)
        {
            double cos = Math.Cos(angle);
            double sin = Math.Sin(angle);

            return(CanChangePosition(p => FiguresUtils.RotatePoint(p - Center, cos, sin) + Center));
        }
示例#2
0
        public virtual void RotateAroundOf(Point rotationsCenter, double angle)
        {
            double cos = Math.Cos(angle);
            double sin = Math.Sin(angle);

            for (int i = 0; i < _definingPoints.Count; i++)
            {
                _definingPoints[i] = FiguresUtils.RotatePoint(_definingPoints[i] - rotationsCenter, cos, sin) + rotationsCenter;
            }

            OnUpdate();
        }