Struct Margins

Struct Margins

Nazwa przestrzeń: Aspose.Note Zgromadzenie: Aspose.Note.dll (25.4.0)

Określa rozmiary marginesów węzła.

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

Dziedziczeni członkowie

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

Constructors

Marginy (floty, float, floty)

Inicjalizuje nową instancję Aspose.Note.Margins strukturyz wyznaczonymi lewą, prawną, górną i dolną marginesami.

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

Parameters

left float

Lewy margines szerokości.

right float

prawą szerokość marży.

top float

Najwyższa szerokość marży.

bottom float

Głębokość dolnej marży.

Fields

Empty

Puste marże są.

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.

Wartość pola

Margins

Properties

Bottom

Zyskuje lub ustawia dolną szerokość marży.

public readonly float Bottom
   {
      get;
      set;
   }

Wartość nieruchomości

float

Left

Zostaw lub ustaw lewą szerokość marży.

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

Wartość nieruchomości

float

Right

Uzyskuje lub ustawia właściwą szerokość marży.

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

Wartość nieruchomości

float

Top

Otrzymuje lub ustawia górną szerokość marży.

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

Wartość nieruchomości

float

Methods

Równoległe ( Margins )

Sprawdź, czy dwie struktury marginesowe są równe.

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

Struktura marginesów.

Returns

bool

To jest system. boolean.

Równości (obiekty )

Sprawdź, czy dwie struktury marginesowe są równe.

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

wszelkich obiektów.

Returns

bool

To jest system. boolean.

Podręcznik ()

Służy jako funkcja hash dla tego typu.

public override int GetHashCode()
   {
   }

Returns

int

Występuje w systemie Int32.

Operators

Operator = = (Margins i Margins)

Sprawdź, czy dwie struktury marginesowe są równe.

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

Struktura marginesów.

rhs Margins

Struktura marginesów należy porównać z.

Returns

bool

To jest system. boolean.

Operator ! = (Margins i Margins)

Sprawdź, czy dwie struktury marginesowe nie są równe.

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

Struktura marginesów.

rhs Margins

Struktura marginesów należy porównać z.

Returns

bool

To jest system. boolean.

 Polski