public override void SetScalars(FontWidthScalarEnum w, FontHeighScalarEnum h) { //// Só aplica a atualização se uma das propriedades mudou //if (w != Width || h != Height) //{ base.SetScalars(w, h); //} }
/// <inheritdoc /> /// <summary> /// Aplica as escalas especificadas /// </summary> /// <param name="w">Escala de largura - Width</param> /// <param name="h">Escalda de altura - Height</param> public virtual void SetScalars(FontWidthScalarEnum w, FontHeighScalarEnum h) { // If both scalars are set to "keep current" then do nothing if (w == FontWidthScalarEnum.NOP && h == FontHeighScalarEnum.NOP) { return; } // Do not alter the scalars if param is set to x0 which means // "keep the current scalar" Width = w == FontWidthScalarEnum.NOP ? Width : w; Height = h == FontHeighScalarEnum.NOP ? Height : h; byte wb = (byte)w; byte hb = (byte)h; byte[] cmd = (byte[])SetScalarCommand.Clone(); cmd[2] = (byte)(wb | hb); internalSend(cmd); }