Struct Margins
Il nome: Aspose.Note Assemblea: Aspose.Note.dll (25.4.0)
Determinare le dimensioni dei margini di 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
I membri ereditari
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Margini (float, float e flotta)
Inizializza una nuova instanza del Aspose.Note.Margins structcon i margini di sinistra, destra, superiore e inferiore specificati.
public Margins(float left, float right, float top, float bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
Parameters
left
float
La larghezza di margine sinistra.
right
float
La larghezza di margine giusta.
top
float
La larghezza di margine superiore.
bottom
float
La larghezza di margine inferiore.
Fields
Empty
I margini vuoti.
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.
Valore di campo
Properties
Bottom
Ottenere o impostare la larghezza di margine inferiore.
public readonly float Bottom
{
get;
set;
}
Valore di proprietà
Left
Ottenere o impostare la larghezza di margine sinistra.
public float Left
{
get => this.Left;
set => this.Left = value;
}
Valore di proprietà
Right
Ottenere o impostare la giusta larghezza di margine.
public float Right
{
get => this.Right;
set => this.Right = value;
}
Valore di proprietà
Top
Ottenere o impostare la larghezza di margine superiore.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
Valore di proprietà
Methods
Il Margherita (Margins)
Testare se le due strutture di margine sono uguali.
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 struttura dei margini.
Returns
Il sistema.Boolean
Gli oggetti (Object)
Testare se le due strutture di margine sono uguali.
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
qualsiasi oggetto.
Returns
Il sistema.Boolean
Il codice ( )
Servisce come funzione hash per il tipo.
public override int GetHashCode()
{
}
Returns
Il sistema.Int32.
Operators
L’operatore = = (Margins e Margins)
Testare se le due strutture di margine sono uguali.
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 struttura dei margini.
rhs
Margins
La struttura dei margini da confrontare con.
Returns
Il sistema.Boolean
L’operatore! = (Margins e Margins)
Testare se le due strutture di margine non sono uguali.
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 struttura dei margini.
rhs
Margins
La struttura dei margini da confrontare con.
Returns
Il sistema.Boolean