Exemplo n.º 1
0
        /// <inheritdoc />
        /// <summary>
        /// Aplica o alinhamento especificado
        /// </summary>
        /// <param name="alignment">Alinhamento para ser aplicado</param>
        public virtual void SetAlignment(FontAlignment alignment)
        {
            // If "keep current" justification is set, do nothing
            if (alignment == FontAlignment.NOP)
            {
                return;
            }

            Alignment = alignment;

            if (JustificationCommands.ContainsKey(alignment))
            {
                byte[] cmd = JustificationCommands[alignment];
                if (cmd != null)
                {
                    internalSend(cmd);
                }
            }
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        /// <summary>
        /// Applies the specified justification
        /// </summary>
        /// <param name="justification">Justification to use</param>
        public virtual void SetJustification(FontJustification justification)
        {
            // If "keep current" justification is set, do nothing
            if (justification == FontJustification.NOP)
            {
                return;
            }

            Justification = justification;

            if (JustificationCommands.ContainsKey(justification))
            {
                byte[] cmd = JustificationCommands[justification];
                if (cmd != null)
                {
                    internalSend(cmd);
                }
            }
        }