/// <summary> /// MarkersGroup class constructor. /// </summary> /// <param name="_locations">Locations represented by map markers.</param> /// <param name="_markersColor">Color of the map markers.</param> /// <param name="_markersSize">Size of the map markers.</param> /// <param name="_markersLabel">Label of the map markers. Only {A-Z, 0-9} uppercase chars are allowed.</param> public MarkersGroup(List <Location> _locations, MarkerColor _markersColor, MarkerSize _markersSize, char _markersLabel) { locations = _locations; markersColor = _markersColor; markersSize = _markersSize; markersLabel = _markersLabel; }
public MarkerStyle(string color = null, char label = char.MinValue, MarkerSize size = MarkerSize.normal) { if (label != char.MinValue && !char.IsLetterOrDigit(label)) { throw new ArgumentException("Value must be an uppercase letter A-Z or a digit 0-9.", nameof(label)); } var sb = new StringBuilder(); void delim(bool check, string name, string value) { if (check) { if (sb.Length > 0) { sb.Append('|'); } sb.Append(name); sb.Append(':'); sb.Append(value); } } delim(size != MarkerSize.normal, nameof(size), size.ToString()); delim(!string.IsNullOrEmpty(color), nameof(color), color); delim(char.IsLetterOrDigit(label), nameof(label), label.ToString(CultureInfo.InvariantCulture)); styleDef = sb.ToString(); }
public MapGoogleMarker(MapGooglePoint markerPoint, MarkerSize mSize, MarkerColor mColor) { this._markerPoint = markerPoint; this._markerSize = mSize; this._markerColor = mColor; this._markerStatus = MarkerStatus.psc; }
public MapGoogleMarker(MapGooglePoint markerPoint, string label, MarkerSize mSize, MarkerColor mColor) { this._markerPoint = markerPoint; this._label = label; this._markerSize = mSize; this._markerColor = mColor; this._markerStatus = MarkerStatus.plsc; }
/// <summary> /// Create a series with the given marker size, conver it to an oxyplot /// series, and return the generated series' marker size. /// </summary> /// <param name="markerSize">Desired marker size.</param> private double GetExportedMarkerSize(MarkerSize markerSize) { IEnumerable <object> x = Enumerable.Empty <object>(); IEnumerable <object> y = Enumerable.Empty <object>(); Line line = new Line(LineType.Solid, LineThickness.Normal); Marker marker = new Marker(MarkerType.FilledCircle, markerSize, 1); LineSeries inputSeries = new LineSeries("", Color.Black, true, x, y, line, marker, "", ""); // Convert the series to an oxyplot series. Series output = exporter.Export(inputSeries, AxisLabelCollection.Empty()).Result; Assert.NotNull(output); Assert.True(output is OxyLineSeries); OxyLineSeries series = (OxyLineSeries)output; return(series.MarkerSize); }
/// <summary> /// Convert an apsim marker size into an oxyplot marker size. /// </summary> /// <param name="thickness">Apsim marker size.</param> public static double ToOxyPlotMarkerSize(this MarkerSize size) { switch (size) { case MarkerSize.VerySmall: return(3); case MarkerSize.Small: return(5); case MarkerSize.Normal: return(7); case MarkerSize.Large: return(9); default: throw new NotImplementedException($"Unknown marker size: {size}"); } }
public Marker(Place location = null, FeatureColor color = FeatureColor.notSet, MarkerSize size = MarkerSize.notSet, char label = '\0') { this.Location = location; this.Size = size; this.Color = color; this.Label = label; }
/// <summary> /// Creates a marker instance. /// </summary> /// <param name="type">Marker type.</param> /// <param name="size">Marker size.</param> /// <param name="modifier">Modifier on marker size, as a proportion of the original size.</param> public Marker(MarkerType type, MarkerSize size, double modifier) { Type = type; Size = size; SizeModifier = modifier; }
public void AcceptAttributeMarkerSize(MarkerSize markerSize, PrintContext parameter) { parameter.WriteLine("Marker Size: {0}", markerSize.Size); }
public virtual void AcceptAttributeMarkerSize(MarkerSize markerSize, T parameter) { // intentionally left blank }
public MapGoogleMarker(MapGooglePoint markerPoint, MarkerSize mSize) { this._markerPoint = markerPoint; this._markerSize = mSize; this._markerStatus = MarkerStatus.ps; }
public void TestMarkerSizeConversion(MarkerSize input, double expectedOutput) { Assert.AreEqual(expectedOutput, input.ToOxyPlotMarkerSize()); }