protected DrawerFactoryBase(ZoomInfo zoom) { _zoom = zoom; }
/// <summary> /// Returns the <see cref="Location"/> parameter or an updated /// one if the zoom level is invalid for the <see cref="Display"/> /// </summary> private Location ValidateZoom(ZoomInfo zoom, Location location) { if (location.Zoom < zoom.Minimum) { return new Location(location.Display, location.Point, zoom.Minimum); } if (location.Zoom > zoom.Maximum) { // Swap to Shape/Icon // If this changes also check the hack in Map.GetSpan if (location.Display == DisplayTypes.Icon) { return new Location(DisplayTypes.Shape, location.Point, IconDrawerFactory.MinVillageSide); } if (location.Display == DisplayTypes.Shape) { return new Location(DisplayTypes.Icon, location.Point, IconDrawerFactory.AutoSwitchFromShapeIndex); } return new Location(location.Display, location.Point, zoom.Maximum); } return location; }
public MapLocationEventArgs(Location newLocation, Location oldLocation, ZoomInfo zoom) { NewLocation = newLocation; OldLocation = oldLocation; ZoomInfo = zoom; }