コード例 #1
0
        public void Reflect(ReflectOrientation orientation)
        {
            SceneRectangle circumscribingRectangle = CalculateCircumscribingRectangle();
            var            pointSceneCenter        = new ScenePoint
            {
                X = (circumscribingRectangle.Vertex1.X + circumscribingRectangle.Vertex2.X) / 2.0,
                Y = (circumscribingRectangle.Vertex1.Y + circumscribingRectangle.Vertex2.Y) / 2.0
            };

            foreach (var figure in _childFigures)
            {
                var points = figure.Points;
                GeneralMethodsFigure.ReflectFigure(orientation, pointSceneCenter, ref points);
                figure.Points = points;
            }
        }
コード例 #2
0
 public void Move(ScenePoint vector)
 {
     GeneralMethodsFigure.Move(vector, ref _points);
     _center = _points[0];
 }
コード例 #3
0
 public void Reflect(ReflectOrientation orientation)
 {
     GeneralMethodsFigure.ReflectFigure(orientation, CenterFigure(), ref _points);
 }
コード例 #4
0
 public void Rotate(double angle)
 {
     GeneralMethodsFigure.RotateFigure(angle, CenterFigure(), ref _points);
 }
コード例 #5
0
 /* Move all the points of current rectangle. */
 public void Move(ScenePoint vector)
 {
     GeneralMethodsFigure.Move(vector, ref _points);
     SetP(_points);
 }