Esempio n. 1
0
        public void TestAdjustAreaProportionally()
        {
            _shapeNames = new List <string> {
                RefShapeName, BlackCornerRectangleName, BlueCornerRectangleName
            };
            InitOriginalShapes(SlideNo.AdjustAreaProportionallyAutoShapeOrigin, _shapeNames);

            var actualShapes   = GetShapes(SlideNo.AdjustAreaProportionallyAutoShapeOrigin, _shapeNames);
            var expectedShapes = GetShapes(SlideNo.AdjustAreaProportionallyAutoShape, _shapeNames);

            actualShapes.LockAspectRatio = MsoTriState.msoFalse;

            _resizeLab.ResizeType = ResizeLabMain.ResizeBy.Actual;
            _resizeLab.AdjustProportionallyProportionList = _proportionList;
            _resizeLab.AdjustAreaProportionally(actualShapes);
            CheckShapes(expectedShapes, actualShapes);
            RestoreShapes(SlideNo.AdjustAreaProportionallyAutoShapeOrigin, _shapeNames);

            InitOriginalShapes(SlideNo.AdjustAreaProportionallyFreeformOrigin, _shapeNames);
            actualShapes   = GetShapes(SlideNo.AdjustAreaProportionallyFreeformOrigin, _shapeNames);
            expectedShapes = GetShapes(SlideNo.AdjustAreaProportionallyFreeform, _shapeNames);
            actualShapes.LockAspectRatio = MsoTriState.msoFalse;

            _resizeLab.AdjustProportionallyProportionList = _proportionList;
            _resizeLab.AdjustAreaProportionally(actualShapes);
            CheckShapes(expectedShapes, actualShapes);
            RestoreShapes(SlideNo.AdjustAreaProportionallyFreeformOrigin, _shapeNames);
        }