Exemplo n.º 1
0
        /// <summary>
        /// Draws text.
        /// </summary>
        /// <param name="foreground">The foreground brush.</param>
        /// <param name="origin">The upper-left corner of the text.</param>
        /// <param name="text">The text.</param>
        public void DrawText(IBrush foreground, Point origin, FormattedText text)
        {
            Contract.Requires <ArgumentNullException>(text != null);

            if (foreground != null)
            {
                PlatformImpl.DrawText(foreground, origin, text.PlatformImpl);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Draws text.
        /// </summary>
        /// <param name="foreground">The foreground brush.</param>
        /// <param name="origin">The upper-left corner of the text.</param>
        /// <param name="text">The text.</param>
        public void DrawText(IBrush foreground, Point origin, FormattedText text)
        {
            _ = text ?? throw new ArgumentNullException(nameof(text));

            if (foreground != null)
            {
                PlatformImpl.DrawText(foreground, origin, text.PlatformImpl);
            }
        }