Пример #1
0
        public void ResizeAndMove(double islandSize, System.Windows.Point islandLocation)
        {
            var resizedMainIslandShapePoints = GetResizedShapePoints(islandSize, MainIslandShape.DrawablePoints);

            SetLocation(islandLocation, resizedMainIslandShapePoints);
            var cliffOutlineWidth = islandSize / CliffOutlineWidthModifier;

            MainIslandShape.SetOutlineWidth(cliffOutlineWidth);
        }
Пример #2
0
        private void SetLocation(System.Windows.Point newLocation, PointCollection drawablePoints)
        {
            var relocatedDrawablePoints = GetRelocatedShapePoints(drawablePoints, newLocation);

            MainIslandShape.SetPoints(relocatedDrawablePoints);
            PullRequestShapes.Move(newLocation);

            var shapeCentre = new System.Windows.Point(newLocation.X, newLocation.Y);

            CentrePoint = shapeCentre;

            // we use the following for collision detection
            var widthAndHeight = MainIslandShape.GetWidthAndHeight(drawablePoints); // only accepts centred points
            var width          = widthAndHeight.X;

            Width = width;
            var height = widthAndHeight.Y;

            Height = height;
        }
Пример #3
0
 public void Highlight(bool enable)
 {
     MainIslandShape.Highlight(enable);
 }