Class Rational
Namespace: Aspose.Imaging.Xmp.Types.Derived
Assembly: Aspose.Imaging.dll (25.4.0)
Represents XMP Rational.
[JsonObject(MemberSerialization.OptIn)]
public class Rational : XmpTypeBase, IXmpType, ICloneable
Inheritance
object ← XmpTypeBase ← Rational
Implements
Inherited Members
XmpTypeBase.GetXmpRepresentation() , XmpTypeBase.ToString() , XmpTypeBase.Clone() , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
Rational(int, int)
Initializes a new instance of the Aspose.Imaging.Xmp.Types.Derived.Rational class.
[JsonConstructor]
public Rational(int numerator, int denominator)
Parameters
numerator
int
The numerator.
denominator
int
The denominator.
Exceptions
numerator;Numberator should be grater zero. or denominator;Denominator should be grater zero.
Properties
Denominator
Gets or sets the denominator.
[JsonProperty]
public int Denominator { get; set; }
Property Value
FloatValue
Gets the float value.
public float FloatValue { get; }
Property Value
Numerator
Gets the numerator.
[JsonProperty]
public int Numerator { get; }
Property Value
Methods
GetXmpRepresentation()
Gets thestring contained value in XMP format.
public override string GetXmpRepresentation()
Returns
Returns the string contained value in XMP format.