Class Rational

Class Rational

Namespace: Aspose.Imaging.Xmp.Types.Derived
Assembly: Aspose.Imaging.dll (25.2.0)

Represents XMP Rational.

[JsonObject(MemberSerialization.OptIn)]
public class Rational : XmpTypeBase, IXmpType, ICloneable

Inheritance

objectXmpTypeBaseRational

Implements

IXmpType, ICloneable

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

ArgumentOutOfRangeException

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

int

FloatValue

Gets the float value.

public float FloatValue { get; }

Property Value

float

Numerator

Gets the numerator.

[JsonProperty]
public int Numerator { get; }

Property Value

int

Methods

GetXmpRepresentation()

Gets thestring contained value in XMP format.

public override string GetXmpRepresentation()

Returns

string

Returns the string contained value in XMP format.