Click or drag to resize
Utils Class
Global utilities and functions.
Inheritance Hierarchy
SystemObject
  Telerik.Windows.Diagrams.CoreUtils

Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core (in Telerik.Windows.Diagrams.Core.dll) Version: 2017.2.614.40 (2017.2.614.40)
Syntax
public static class Utils

The Utils type exposes the following members.

Methods
  NameDescription
Public methodStatic memberApproximateArc
Approximates the arc.
Public methodStatic memberApproximateBezierCurve
Approximates the Bezier curve as segments represented by a series of points.
Public methodStatic memberApproximateEllipse
Approximates the ellipse defined by the given bounds.
Public methodStatic memberApproximateRoundedRectangle(Rect, Double)
Approximates the rounded rectangle.
Public methodStatic memberApproximateRoundedRectangle(Double, Double, Double, Double, Double)
Approximates the rounded rectangle.
Public methodStatic memberArcConvert
Arcs the convert.
Public methodStatic memberAreClose
Checks whether two values are close.
Public methodStatic memberAreLinesIntersecting
Returns whether the line (line segments) intersect and returns in the crossingPoint the actual crossing point if they do.
Public methodStatic memberBarycentricPercentageFromPoint
Returns the barycentric coordinates as percentages with respect to the given rectangle.
Public methodStatic memberBetweenOrEqual
Tells you whether the given value sits in the specified interval.
Public methodStatic memberCartesianToPolar
Converts the Cartesian coordinates to polar coordinates.
Public methodStatic memberCloser(Double, Double, Double)
Given an interval and a value this will output the value which is closer to the given value.
Public methodStatic memberCloser(Point, Point, Point)
Returns the point of the interval which sits the closest to the given point.
Public methodStatic memberCloser(Double, Double, Double, Double, Double)
Given an interval and a value this will output the value which is closer to the given value.
Public methodStatic memberCoerceAngle
Coerces the given angle. The return angle will be between 0 and 360.
Public methodStatic memberConstrain
Constrains the specified value to the given interval.
Public methodStatic memberDelta
Returns the vector between the two points.
Public methodStatic memberDeterminant
Determinants the specified point1.
Public methodStatic memberDistance
Returns the distance of the point to the origin.
Public methodStatic memberDistancePoint
Calculates the point of the specified line segment which determines the distance from the specified point to the line segment. That is, the perpendicular projection onto the segment.
Public methodStatic memberDistanceSquared
Returns the squared distance between the given points.
Public methodStatic memberDot(Point, Point)
Returns the dot product of the specified points.
Public methodStatic memberDot(Vector, Vector)
Returns the dot product of the specified vectors.
Public methodStatic memberDoubleFromMantissaAndExponent
Gets a double value from mantissa and exponent.
Public methodStatic memberEnsureRange
Ensures the range.
Public methodStatic memberFindAngle
Finds the angle between two points.
Public methodStatic memberFindIntersectionPoint
Finds the intersection point of a shape and the line segment defined by the point segmentStart and segmentEnd.
Public methodStatic memberFindLinesIntersection
Finds the intersection point of the lines defined by the point pairs.
Public methodStatic memberFindRadian
Finds the radian between two points.
Public methodStatic memberFromLtrd Obsolete.
Creates a new rectangle from the left top and right bottom coordinates.
Public methodStatic memberGetAssemblyName
Gets the name of the assembly.
Public methodStatic memberGetBezierPoint
Gets the Bezier point at the specified value.
Public methodStatic memberGetBottomRightPoint
Gets a point from the maximum X and Y values from the specified points.
Public methodStatic memberGetBounds
Gets the enclosing bounds of the points collection.
Public methodStatic memberGetChildElements
Gets the only the child elements.
Public methodStatic memberGetEllipsePointAtAngle
Returns the point at an angle on the ellipse defined by the specified rectangle.
Public methodStatic memberGetEnumValuesT
Gets the enumeration values.
Public methodStatic memberGetNormalizationPoint
Gets the normalization point.
Public methodStatic memberGetNormalizedPoints
Gets the normalized points.
Public methodStatic memberGetProjections
Gets the projected points of the specified point on the given rectangle.
Public methodStatic memberGetPythagorEqualSide
Gets the equal sides of a triangle from the Pythagor theorem.
Public methodStatic memberGetPythagorHypotenuse
Gets the hypotenuse according to the Pythagoras theorem.
Public methodStatic memberGetTopLeftPoint
Gets a point from the minimum X and Y values from the specified points.
Public methodStatic memberHasValidArea
Determines whether [has valid area] [the specified size].
Public methodStatic memberHypotenuse
Hypotenuses the specified x.
Public methodStatic memberIntersect
Determines whether the specified line segments intersect.
Public methodStatic memberIntersectionPointOnEllipse(CollectionPoint, Point, Point, Point)
Calculate the intersection point between a polyline and a line segment.
Public methodStatic memberIntersectionPointOnEllipse(Rect, Point, Point, Point)
Calculate the intersection point between an ellipse and a line segment.
Public methodStatic memberIntersectionPointOnRectangle
Calculates the intersection point between the specified rectangle and the line segment defined by the specified points.
Public methodStatic memberInvertPoint
Inverts the point.
Public methodStatic memberIsCounterClockWise
Determines, given three points, if when travelling from the first to the second to the third, we travel in a counterclockwise direction.
Public methodStatic memberIsEqual
Determines whether the specified values are equal with Epsilon approximation.
Public methodStatic memberIsFiniteDouble
Determines whether [is finite double] [the specified x].
Public methodStatic memberIsGreaterThan
Determines whether [is greater than] [the specified value1].
Public methodStatic memberIsGreaterThanOrClose
Determines whether [is greater than or close] [the specified value1].
Public methodStatic memberIsInClosedInterval
Determines whether the specified value is in the specified closed interval.
Public methodStatic memberIsInRightOpenInterval
Determines whether the specified value is in the specified right open interval.
Public methodStatic memberIsLessOrEqual
Determines whether [is less or equal] [the specified value1].
Public methodStatic memberIsLessThan
Determines whether [is less than] [the specified value1].
Public methodStatic memberIsLessThanOrClose
Determines whether [is less than or close] [the specified value1].
Public methodStatic memberIsNanOrInfinity(Double)
Gets whether the value is double or infinity.
Public methodStatic memberIsNanOrInfinity(Point)
Gets whether the value is NaN or infinite point.
Public methodStatic memberIsNotEqual
Determines whether the specified values are not equal with Epsilon approximation.
Public methodStatic memberIsPointInEllipse
Returns whether the specified point is inside the ellipse defined by the specified rectangle.
Public methodStatic memberIsPointInRectangle(Point, Rect) Obsolete.
Determines whether [is point in rectangle] [the specified point].
Public methodStatic memberIsPointInRectangle(Point, Size)
Determines whether [is point in rectangle] [the specified point].
Public methodStatic memberIsVerySmall
Determines whether [is very small] [the specified value].
Public methodStatic memberLength
Returns the length of the given point considered as a vector.
Public methodStatic memberLerp(Double, Double, Double)
Linear interpolation between the two given values.
Public methodStatic memberLerp(Point, Point, Double)
Linear interpolation between the two given points.
Public methodStatic memberLerp(Vector, Vector, Double)
Linear interpolation between the two given vectors.
Public methodStatic memberLimit
Moves the given point into the rectangle by taking the rectangle's intervals as limiting values for the point's coordinates.
Public methodStatic memberMiddlePoint
Returns the middle point between the given points.
Public methodStatic memberMirrorHorizontally
Returns the mirrored vector with respect to the X-coordinate.
Public methodStatic memberMirrorPoint(Point, Point)
Mirrors the point with respect to the given center.
Public methodStatic memberMirrorPoint(Point, Point, Point)
Returns the opposite of point point with respect to specified line.
Public methodStatic memberMirrorVertically
Returns the mirrored vector with respect to the Y-coordinate.
Public methodStatic memberNearestIntersectionPoint
Calculates the intersection points with each of the given segments and determines the one nearest to the first point.
Public methodStatic memberNearestPoint
Gets the nearest point.
Public methodStatic memberNormal
Normalize the specified point1.
Public methodStatic memberNormalizeAngle
Normalizes the specified angle into the [0, 2Pi] interval.
Public methodStatic memberNormalized
Normalize the specified vector.
Public methodStatic memberOffset(IEnumerablePoint, Vector)
Offsets the specified points.
Public methodStatic memberOffset(IListPoint, IListPoint, Vector)
Offsets the point collection.
Public methodStatic memberPerpendicular
Returns the perpendicular of the specified vector.
Public methodStatic memberPointFromBarycentricPercentage(Point, Rect)
Given a percentage and a rectangle this will return the coordinates corresponding to the percentages given.
Public methodStatic memberPointFromBarycentricPercentage(Point, Size)
Given rect1 percentage and a rectangle this will return the coordinates corresponding to the percentages given.
Public methodStatic memberPointOnLine
Gets a point extending the line by a specified distance.
Public methodStatic memberPolarToCartesian
Polar to cartesian coordinates conversion.
Public methodStatic memberPolylineToBezier
The opposite of the approximation method, this attempts to smoothen out the polyline to a Bezier curve.
Public methodStatic memberProjectPointOnLine
Finds the projection (point) of the given point on the line.
Public methodStatic memberPush
Pushes the specified start point onwards in the direction specified by the vector and a length given.
Public methodStatic memberRotatePointsAt
Rotates the points.
Public methodStatic memberRotateTransform
Rotates the transform.
Public methodStatic memberSafeDivide
Safes the divide.
Public methodStatic memberSameSide
Determine whether point1 and point2 are on the same side of a line.
Public methodStatic memberSegmentIntersect
Checks whether the segments defined by the specified point pairs intersect and returns the intersection point.
Public methodStatic memberSnap
Snaps the specified value.
Public methodStatic memberSquare
Squares the specified value.
Public methodStatic memberStairValue(Point, Rect)
Returns the StairValue(Double, Double, Double) of the x,y values of the given point with respect to the boundaries of the specified rectangle.
Public methodStatic memberStairValue(Double, Double, Double)
Returns zero within the given interval and +/-1 whether the value is above or below the interval.
Public methodStatic memberSwap(Double, Double)
Swaps the values of the two numbers.
Public methodStatic memberSwap(Point, Point)
Swaps the values of the two points.
Public methodStatic memberToDegrees
Converts the specified value from radians to degrees.
Public methodStatic memberToDoubleCollection
DoubleCollection from a string representation.
Public methodStatic memberToEnumT
Returns value of the enumeration.
Public methodStatic memberToInvariant(IListPoint)
Returns a string serialization of the given point collection.
Public methodStatic memberToInvariant(Double)
Converts the double to a string representation.
Public methodStatic memberToInvariant(Int32)
Converts the integer to a string representation.
Public methodStatic memberToInvariant(DoubleCollection)
Converts the double collection to a string representation.
Public methodStatic memberToInvariant(Point)
Converts the point to a string representation.
Public methodStatic memberToInvariant(Size)
Converts the point to a string representation.
Public methodStatic memberToPoint
Attempts to convert the given string to a points.
Public methodStatic memberToPoints
Attempts to convert the given string to a list of points.
Public methodStatic memberToRadians
Converts the specified value from degrees to radians.
Public methodStatic memberToRect
Return a rectangle located a (0.0) with the specified size.
Public methodStatic memberToSize
Sizes from string.
Public methodStatic memberToUnit
Returns a unit point in the direction defined by the given point.
Public methodStatic memberUnion
Unions two rectangles.
Public methodStatic memberUnitVector
Returns a unit vector in the direction specified by the angle.
Public methodStatic memberUppercaseFirstLetter
Uppercases the first letter of the string.
Top
Fields
  NameDescription
Public fieldStatic memberEpsilon
An infinitesimal value.
Top
See Also