protected override List <(PointF loc, SizeF size)> GetDimensions() { RectangleF rectangle = GetMapLayout().Coordinates; float rectangleCenterX = rectangle.X + rectangle.Width / 2; float rectangleCenterZ = rectangle.Y + rectangle.Height / 2; List <(float x, float z)> rectangleCenters = Config.MapGraphics.MapViewEnablePuView ? MapUtilities.GetPuCoordinates(rectangleCenterX, rectangleCenterZ) : new List <(float x, float z)>() { (rectangleCenterX, rectangleCenterZ) }; List <(float x, float z)> controlCenters = rectangleCenters.ConvertAll( rectangleCenter => MapUtilities.ConvertCoordsForControlTopDownView(rectangleCenter.x, rectangleCenter.z)); float sizeX = rectangle.Width * Config.MapGraphics.MapViewScaleValue; float sizeZ = rectangle.Height * Config.MapGraphics.MapViewScaleValue; List <(PointF loc, SizeF size)> dimensions = controlCenters.ConvertAll( controlCenter => (new PointF(controlCenter.x, controlCenter.z), new SizeF(sizeX, sizeZ))); return(dimensions); }
protected override List <(PointF loc, SizeF size)> GetDimensions() { MapLayout mapLayout = GetMapLayout(); RectangleF rectangle = mapLayout.Coordinates; float rectangleCenterX = rectangle.X + rectangle.Width / 2; float rectangleCenterZ = rectangle.Y + rectangle.Height / 2; int size = Math.Max(1, (int)Size); List <(float x, float z)> rectangleCenters = Config.MapGui.checkBoxMapOptionsEnablePuView.Checked && mapLayout.Id != "000" ? MapUtilities.GetPuCoordinates(rectangleCenterX, rectangleCenterZ, size) : new List <(float x, float z)>() { (rectangleCenterX, rectangleCenterZ) }; List <(float x, float z)> controlCenters = rectangleCenters.ConvertAll( rectangleCenter => MapUtilities.ConvertCoordsForControlTopDownView(rectangleCenter.x, rectangleCenter.z, UseRelativeCoordinates)); float sizeX = rectangle.Width * Config.CurrentMapGraphics.MapViewScaleValue; float sizeZ = rectangle.Height * Config.CurrentMapGraphics.MapViewScaleValue; List <(PointF loc, SizeF size)> dimensions = controlCenters.ConvertAll( controlCenter => (new PointF(controlCenter.x, controlCenter.z), new SizeF(sizeX, sizeZ))); return(dimensions); }