Struct Margins

Struct Margins

Nombre del espacio: Aspose.Note Asamblea: Aspose.Note.dll (25.4.0)

Especifica las dimensiones de las margen de un 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

Miembros heredados

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

Constructors

Margins (flato, float, flotado y flotada)

Inicia una nueva instancia del Aspose.Note.Margins estructuracon los margen de izquierda, derecha, arriba y abajo especificados.

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

Parameters

left float

La margen izquierda.

right float

La margen derecha.

top float

El máximo de margen.

bottom float

El fondo de la margen.

Fields

Empty

Las margen vacías.

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

Obtenga o establece la anchura de la margen inferior.

public readonly float Bottom
   {
      get;
      set;
   }

Valor de la propiedad

float

Left

Obtenga o establece la anchura de la margen izquierda.

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

Valor de la propiedad

float

Right

Obtenga o establece la anchura de margen correcta.

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

Valor de la propiedad

float

Top

Obtenga o establece la anchura de la margen superior.

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

Valor de la propiedad

float

Methods

Los margenes (Margins)

Testar si dos estructuras de margen son iguales.

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

La estructura de las margenas.

Returns

bool

El sistema.Boolean

Los objetos (objetos)

Testar si dos estructuras de margen son iguales.

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

cualquier objeto.

Returns

bool

El sistema.Boolean

Título: GetHashCode

Serve como una función de hash para el tipo.

public override int GetHashCode()
   {
   }

Returns

int

El sistema.Int32.

Operators

Operador = = (Margins y Margins)

Testar si dos estructuras de margen son iguales.

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

La estructura de las margenas.

rhs Margins

La estructura de las margenas a comparar con.

Returns

bool

El sistema.Boolean

¡Margins y Margins!

Testar si dos estructuras de margen no son iguales.

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

La estructura de las margenas.

rhs Margins

La estructura de las margenas a comparar con.

Returns

bool

El sistema.Boolean

 Español