﻿using System.Collections.Generic;
using AngelFont;

namespace Test_Harness
{
    /// <summary>
    /// Implements a builder for the <see cref="AngelFont.FontKerningTable"/> class.
    /// </summary>
    public sealed class Builder_FontKerningTable
    {
        /// <summary>
        /// The kerning pairs to inject into a font kerning table instance when building.
        /// </summary>
        private IEnumerable<KerningPairInfo> kerningPairs;

        /// <summary>
        /// Initializes a new instance of the <see cref="Builder_FontKerningTable"/> class.
        /// </summary>
        public Builder_FontKerningTable()
        {
            this.kerningPairs = new KerningPairInfo[0];
        }

        /// <summary>
        /// Builds this instance.
        /// </summary>
        /// <returns>The built instance.</returns>
        public FontKerningTable Build()
        {
            return new FontKerningTable(this.kerningPairs);
        }

        /// <summary>
        /// Sets the kerning pairs.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns>The builder instance.</returns>
        public Builder_FontKerningTable SetKerningPairs(IEnumerable<KerningPairInfo> value)
        {
            this.kerningPairs = value;
            return this;
        }
    }
}
