<commit_before>﻿using Mapsui.Geometries;
using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Styles;

namespace Mapsui.Tests.Common.Maps
{
    public static class LabelSample
    {
        public static Map CreateMap()
        {
            var map = new Map
            {
                BackColor = Color.Transparent,
                Viewport =
                {
                    Center = new Point(100, 100),
                    Width = 200,
                    Height = 200,
                    Resolution = 1
                }
            };
            map.Layers.Add(new MemoryLayer
            {
                Style = null,
                DataSource = CreateProviderWithLabels(),
                Name = "Labels"
            });
            return map;
        }

        private static MemoryProvider CreateProviderWithLabels()
        {
            var features = new Features
            {
                new Feature
                {
                    Geometry = new Point(50, 50),
                    Styles = new[] {new VectorStyle {Fill = new Brush(Color.Gray), Outline = new Pen(Color.Black)}}
                },
                new Feature
                {
                    Geometry = new Point(50, 150),
                    Styles = new[] {new LabelStyle {Text = "Black Text", BackColor = null}}
                },
                new Feature
                {
                    Geometry = new Point(150, 50),
                    Styles =
                        new[]
                        {
                            new LabelStyle
                            {
                                Text = "Gray Backcolor",
                                BackColor = new Brush(Color.Gray),
                                ForeColor = Color.White
                            }
                        }
                },
                new Feature
                {
                    Geometry = new Point(150, 150),
                    Styles =
                        new[]
                        {
                            new LabelStyle
                            {
                                Text = "Black Halo",
                                ForeColor = Color.White,
                                Halo = new Pen(Color.Red),
                                BackColor = null
                            }
                        }
                },
                new Feature
                {
                    Geometry = new Point(50, -50),
                    Styles = new[]
                    {
                        new LabelStyle
                        {
                            Text = string.Empty,
                            BackColor = new Brush(Color.Black),
                            ForeColor = Color.White,
                            LabelMethod = f => null
                        }
                    }
                }
            };
            var provider = new MemoryProvider(features);
            return provider;
        }
    }
}<commit_msg>Made black halo actually black<commit_after>﻿using Mapsui.Geometries;
using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Styles;

namespace Mapsui.Tests.Common.Maps
{
    public static class LabelSample
    {
        public static Map CreateMap()
        {
            var map = new Map
            {
                BackColor = Color.Transparent,
                Viewport =
                {
                    Center = new Point(100, 100),
                    Width = 200,
                    Height = 200,
                    Resolution = 1
                }
            };
            map.Layers.Add(new MemoryLayer
            {
                Style = null,
                DataSource = CreateProviderWithLabels(),
                Name = "Labels"
            });
            return map;
        }

        private static MemoryProvider CreateProviderWithLabels()
        {
            var features = new Features
            {
                new Feature
                {
                    Geometry = new Point(50, 50),
                    Styles = new[] {new VectorStyle {Fill = new Brush(Color.Gray), Outline = new Pen(Color.Black)}}
                },
                new Feature
                {
                    Geometry = new Point(50, 150),
                    Styles = new[] {new LabelStyle {Text = "Black Text", BackColor = null}}
                },
                new Feature
                {
                    Geometry = new Point(150, 50),
                    Styles =
                        new[]
                        {
                            new LabelStyle
                            {
                                Text = "Gray Backcolor",
                                BackColor = new Brush(Color.Gray),
                                ForeColor = Color.White
                            }
                        }
                },
                new Feature
                {
                    Geometry = new Point(150, 150),
                    Styles =
                        new[]
                        {
                            new LabelStyle
                            {
                                Text = "Black Halo",
                                ForeColor = Color.White,
                                Halo = new Pen(Color.Black),
                                BackColor = null
                            }
                        }
                },
                new Feature
                {
                    Geometry = new Point(50, -50),
                    Styles = new[]
                    {
                        new LabelStyle
                        {
                            Text = string.Empty,
                            BackColor = new Brush(Color.Black),
                            ForeColor = Color.White,
                            LabelMethod = f => null
                        }
                    }
                }
            };
            var provider = new MemoryProvider(features);
            return provider;
        }
    }
}
{'fraction_non_alphanumeric': 0.06552006552006552, 'fraction_numerical': 0.012121212121212121, 'mean_word_length': 0.65608896121508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7311182', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1193, 'n_words': 300}