Struct Margins

Struct Margins

Nome do espaço: Aspose.Note Assembleia: Aspose.Note.dll (25.4.0)

Determina as dimensões das margens de um nodo.

public struct Margins : IEquatable<Margins>
   {
      public double Left;
      public double Top;
      public double Right;
      public double Bottom;
      public bool Equals(Margins other)
      {
         return (this.Left == other.Left && this.Top == other.Top && this.Right == other.Right && this.Bottom == other.Bottom);
      }
   }

Implements

IEquatable

Membros herdados

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

Margins (Float, Float e Flot)

Inicia uma nova instância do Aspose.Note.Margins structcom as margens especificadas esquerda, direita, superior e inferior.

public Margins(float left, float right, float top, float bottom)
   {
      Left = left;
      Right = right;
      Top = top;
      Bottom = bottom;
   }

Parameters

left float

largura da margem esquerda.

right float

A largura da margem certa.

top float

A largura da margem superior.

bottom float

A largura da margem inferior.

Fields

Empty

As margens vazias.

public static readonly Margins Empty = new Margins();
In this case, no changes were made because the given code already follows standard C# conventions. When dealing with more complex scenarios, additional adjustments such as line wrapping at appropriate indentation levels and consistent spacing between keywords and operands may be necessary.

Valor de campo

Margins

Properties

Bottom

Obter ou definir a largura da margem inferior.

public readonly float Bottom
   {
      get;
      set;
   }

Valor da propriedade

float

Left

Obter ou definir a largura da margem esquerda.

public float Left
   {
      get => this.Left;
      set => this.Left = value;
   }

Valor da propriedade

float

Right

Obter ou definir a largura de margem certa.

public float Right
    {
       get => this.Right;
       set => this.Right = value;
    }

Valor da propriedade

float

Top

Obter ou definir a largura de margem superior.

public float Top
   {
      get => this._top;
      set => this._top = value;
   }
   private float _top;

Valor da propriedade

float

Methods

Equações ( Margins )

Verifique se duas estruturas de margins são iguais.

public bool Equals(Margins other)
   {
      return (this.Left == other.Left)
             && (this.Top == other.Top)
             && (this.Right == other.Right)
             && (this.Bottom == other.Bottom);
   }

Parameters

other Margins

A estrutura das margens.

Returns

bool

É o sistema.Boolean.

Equalidade ( Objeto )

Verifique se duas estruturas de margins são iguais.

public override bool Equals(object obj)
   {
      if (obj is null || !(obj is MyClass)) // Changed line break to improve readability
         return false;
      var other = (MyClass)obj; // Casting variable declaration on the same line for better readability
      return this.Property1 == other.Property1 && this.Property2 == other.Property2; // Aligned conditions for better readability
   }

Parameters

obj object

qualquer objeto.

Returns

bool

É o sistema.Boolean.

Conexão ( )

Ele serve como uma função de hash para o tipo.

public override int GetHashCode()
   {
   }

Returns

int

O sistema.Int32.

Operators

Operador = = (Margins e Margins)

Verifique se duas estruturas de margins são iguais.

public static bool operator==(Margins lhs, Margins rhs)
   {
      return (lhs.Left == rhs.Left) &&
             (lhs.Right == rhs.Right) &&
             (lhs.Top == rhs.Top) &&
             (lhs.Bottom == rhs.Bottom);
   }

Parameters

lhs Margins

A estrutura das margens.

rhs Margins

A estrutura de Margins a ser comparada.

Returns

bool

É o sistema.Boolean.

Acompanhante! = (Margins e Margins)

Verifique se as duas estruturas de Margins não são iguais.

public static bool operator !=(Margins lhs, Margins rhs)
   {
       return !(lhs.Left == rhs.Left &&
                 lhs.Right == rhs.Right &&
                 lhs.Top == rhs.Top &&
                 lhs.Bottom == rhs.Bottom);
   }

Parameters

lhs Margins

A estrutura das margens.

rhs Margins

A estrutura de Margins a ser comparada.

Returns

bool

É o sistema.Boolean.

 Português