Struct Margins
Името на пространството: Aspose.Note Асамблея: Aspose.Note.dll (25.4.0)
Определя размера на маргините на възел.
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
наследници
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Маргини (плава, плава и плува)
Иницијализира нова инстанция на Aspose.Note.Margins структурас посочените леви, десни, горни и долни маргини.
public Margins(float left, float right, float top, float bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
Parameters
left
float
Левият марж е широк.
right
float
Правата маргинална ширина.
top
float
Най-високата ширина на маржа.
bottom
float
Долната маржична ширина.
Fields
Empty
Празните маргини.
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.
полева стойност
Properties
Bottom
Получава или поставя долната маржа ширина.
public readonly float Bottom
{
get;
set;
}
стойност на имота
Left
Получава или поставя левия марж ширина.
public float Left
{
get => this.Left;
set => this.Left = value;
}
стойност на имота
Right
Получавате или поставяте правилната широчина на маржа.
public float Right
{
get => this.Right;
set => this.Right = value;
}
стойност на имота
Top
Получава или поставя горната маржична ширина.
public float Top
{
get => this._top;
set => this._top = value;
}
private float _top;
стойност на имота
Methods
Еквивалент на маргините (Margins)
Тестват дали двете маргинални структури са равни.
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
Структурата на маргините.
Returns
Системата е боолеан.
Еквивалент на обекта (object)
Тестват дали двете маргинални структури са равни.
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
всякакви обекти.
Returns
Системата е боолеан.
Изтегляне на кода()
Той служи като функция за хаш за типа.
public override int GetHashCode()
{
}
Returns
Системът е инт32.
Operators
Оператор = = (Margins и Margins)
Тестват дали двете маргинални структури са равни.
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
Структурата на маргините.
rhs
Margins
Структурата на маргините трябва да се сравни с.
Returns
Системата е боолеан.
Операторът! = (Маргинс, Маржинс)
Тестват дали две маргинални структури не са равни.
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
Структурата на маргините.
rhs
Margins
Структурата на маргините трябва да се сравни с.
Returns
Системата е боолеан.