Click or drag to resize
Ranorex

Distance Structure

Represents an proportional or fixed distance in pixels.

Namespace:  Ranorex.Core
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
[TypeConverterAttribute(typeof(DistanceDistanceConverter))]
public struct Distance

The Distance type exposes the following members.

Constructors
  NameDescription
Public methodDistance(Double)
Creates a new proportional distance.
Public methodDistance(Int32)
Creates a new fixed distance.
Top
Properties
  NameDescription
Public propertyFixedDistance
Gets the fixed distance in pixels. Throws an exception if the distance is a proportional distance.
Public propertyIsFixedDistance
Gets a value indicating whether the this instance is a fixed e.g. has a fixed pixel value.
Public propertyProportionalDistance
Gets the proportional distance. Throws an exception if the distance is a fixed distance.
Top
Methods
  NameDescription
Public methodCalculateFixedDistance
Calculates the fixed distance for the specified element rectangle and the given angle.
Public methodEquals
Compares two distances if they are equal.
(Overrides ValueTypeEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberFromFixedDistance
Converts from Int32 to a Distance.
Public methodStatic memberFromProportionalDistance
Converts from Double to a Distance.
Public methodGetHashCode
Returns a integer hash code for the current object.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParse
Converts a string representation of a distance to its distance equivalent.
Public methodToString
Returns a string representation of the distance.
(Overrides ValueTypeToString.)
Public methodStatic memberTryParse
Converts a string representation of a distance to its distance equivalent. The return value indicates whether the conversion succeeded.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two distances if they are equal.
Public operatorStatic member(Double to Distance)
Performs an implicit conversion from Double to a Distance.
Public operatorStatic member(Int32 to Distance)
Performs an implicit conversion from Int32 to a Distance.
Public operatorStatic memberInequality
Compares two distances if they are not equal.
Top
Remarks
A fixed distance specifies the distance in pixels. The proportional distance is specified as the percentage of an elements width or height. Proportional distances are only useful when they are used in conjunction with an GestureDirection to calculate the fixed distance based on some element rectangle.
See Also