Struct Margins

Struct Margins

Namespace: Aspose.Note
Assembly: Aspose.Note.dll (25.6.0)

Specifies the dimensions of the margins of a node.

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

Implements

IEquatable

Inherited Members

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

Constructors

Margins(float, float, float, float)

Initializes a new instance of the Aspose.Note.Margins structwith the specified left, right, top, and bottom margins.

public Margins(float left, float right, float top, float bottom)
   {
      this.left = left;
      this.right = right;
      this.top = top;
      this.bottom = bottom;
   }

Parameters

left float

The left margin width.

right float

The right margin width.

top float

The top margin width.

bottom float

The bottom margin width.

Fields

Empty

The empty margins.

public static readonly Margins Empty = new Margins();
public static readonly Margins Empty { get; } = new Margins();

Field Value

Margins

Properties

Bottom

Gets or sets the bottom margin width.

public readonly float Bottom
   {
      get;
      private set;
   }

Property Value

float

Left

Gets or sets the left margin width.

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

Property Value

float

Right

Gets or sets the right margin width.

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

Property Value

float

Top

Gets or sets the top margin width.

public readonly float Top
   {
      get
      {
      }
      set
      {
      }
   }

Property Value

float

Methods

Equals(Margins)

Tests whether two Margins structures are equal.

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

Parameters

other Margins

The Margins structure.

Returns

bool

The System.Boolean.

Equals(object)

Tests whether two Margins structures are equal.

public override bool Equals(object obj)
{
    if (obj == null || GetType() != obj.GetType())
        return false;
    Aspose.Words.CheckBox checkBox = (Aspose.Words.CheckBox)obj;
    return this.Equals(checkBox);
}

Parameters

obj object

Any object.

Returns

bool

The System.Boolean.

GetHashCode()

Serves as a hash function for the type.

public override int GetHashCode()
{
}

Returns

int

The System.Int32.

Operators

operator ==(Margins, Margins)

Tests whether two Margins structures are equal.

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

Parameters

lhs Margins

The Margins structure.

rhs Margins

The Margins structure to be compared with.

Returns

bool

The System.Boolean.

operator !=(Margins, Margins)

Tests whether two Margins structures are not equal.

public static bool operator !=(Margins lhs, Margins rhs)
   {
      return ! (lhs == rhs);
   }

Parameters

lhs Margins

The Margins structure.

rhs Margins

The Margins structure to be compared with.

Returns

bool

The System.Boolean.

 English