Ejemplo n.º 1
0
        /// <summary>
        /// Creates a copy of another font with its own state.
        /// </summary>
        /// <param name="prototypeFont"></param>
        public Font(Font prototypeFont)
        {
            Require.ArgumentNotNull(prototypeFont, nameof(prototypeFont));

            core = prototypeFont.Core;

            state = prototypeFont.state.Clone();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a copy of a another font with its own state and style.
        /// </summary>
        /// <param name="prototypeFont"></param>
        /// <param name="style"></param>
        public Font(Font prototypeFont, FontStyles style)
        {
            Require.ArgumentNotNull(prototypeFont, nameof(prototypeFont));

            core = prototypeFont.Core;

            state       = prototypeFont.state.Clone();
            state.Style = style;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a copy of another font with its own state.
        /// </summary>
        /// <param name="prototypeFontCore"></param>
        public Font(IFontCore prototypeFontCore)
        {
            Require.ArgumentNotNull(prototypeFontCore, nameof(prototypeFontCore));

            core = prototypeFontCore;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new, empty font object.
 /// </summary>
 /// <param name="name"></param>
 public Font(string name)
 {
     core = new FontCore(name);
 }