DiagramLite Programmer's Guide
Utilities Members
Methods
 


Contains common helper methods.

The following tables list the members exposed by the Utilities type.

 Public Methods

  Name Description

AddArc

Overloaded.  

AddBezier

Adds a Bezier curve to the specified PathFigure.

AddBeziers

Adds a series of Bezier curves to the specified PathFigure.

AddLine

Overloaded.  

AddPolyLine

Overloaded.  

AddRoundRect

Overloaded.  

ApproxArc

Approximates an arc by a series of line segments.

ApproxBezier

Overloaded.  

ApproxRoundRect

Overloaded.  

ArcPoint

Returns the point that lies on an ellipse bounded by the specified rectangle at the specified angle.

BottomLeft

Returns the bottom left point of the specified rectangle.

BottomRight

Returns the bottom right point of the specified rectangle.

CalcBezierCoef

Calculates the bezier coefficients in the equation of the specified bezier curve.

CartesianToPolar

Converts Cartesian coordinates to the corresponding polar coordinates, using the specified point as a center of the coordinate system.

Ccw

Determines, given three points, if when travelling from the first to the second to the third, we travel in a counterclockwise direction.

Center

Returns the center of the specified rectangle.

CheckIntersect

Checks if the specified rectangle and circle intersect.

Closer

Overloaded.  

Contains

Checks whether the specified hashtable contains the specified key.

Degrees

Converts the specified value from degrees to radians.

Distance

Overloaded.  

DistanceSq

Calculates the square of the distance between the specified points.

DistanceToLine

Returns the distance from a point to a line.

DistanceToLineSquared

Returns the squared distance between the specified points.

DistanceToSegment

Returns the distance from a point to a line segment.

DistanceToSegmentSquared

Returns the squared distance from a point to a line segment.

DistToBezier

Calculates the shortest distance from the specified point to the specified bezier curve.

DistToPolyline

Overloaded.  

DistToRectPoint

Returns the nearest to pt point that lies on the outline of rectangle.

FindHtmlAncestor

For internal use.

FromLTRB

Creates a new System.Windows.Rect out of the specified coordinates.

GetBezierPt

Gets the point from the specified bezier curve, corresponding to the specified parameter t [0, 1].

GetEllipseIntr

Calculate the intersection point between the ellipse with the specified bounds and the line segment defined by the specified points.

GetLoadedType

Gets the type with the specified name.

GetMinArrowheadSize

Gets the minimum allowed size of an arrowhead.

GetRect

Gets the position and size of the specified element on the canvas.

GetRectIntr

Calculates the intersection point between the specified rectangle and the line segment defined by the specified points.

GetReflHth

Gets the initial distance between adjacent control points of a reflexive arrow along the Y-axis.

GetReflWth2

Gets the initial distance between adjacent control points of a reflexive link along the X-axis.

GetRootVisual

Gets the application's root visual element.

Inflate

Adds the specified amount to the rectangle dimensions in all directions.

Intersect

Determines whether the specified line segments intersect.

IntersectsLineSegment

Gets the intersection point of a line segments and a rectangle.

LineIntersect

Finds the intersection point of the lines defined by the specified point pairs.

LineIntersectNaN

Finds the intersection point of the lines defined by the specified point pairs.

LineSegmentsIntersect

Gets the intersection point of two line segments AB and CD.

LoadImage

Loads an image from the specified stream.

MatchPointsMinLength

Returns an array of node anchor points which match current node links anchor point

MeasureText

Measures the specified text when drawn with the specified font.

MidPoint

Returns the middle point of the segment defined by the specified points.

MinDistToRect

Calculates the minimum distance between a given point and a given rectangle.

NearestPoint

Returns the element from the specified point array nearest to the specified point.

Offset

Moves the specified rectangle by the specified offset.

PointInEllipse

Checks whether the specified point is contained in the ellipse defined by the specified rectangle.

PointInRect

Checks whether the specified rectangle contains the specified point.

PolarToCartesian

Converts polar coordinates to the corresponding Cartesian coordinates, using the specified point as a center of the coordinate system.

Radians

Converts the specified value from degrees to radians.

RectIntersects

Determines if rectangle intersects with rect.

SegmentIntersect

Checks whether the segments defined by the specified point pairs intersect and returns the intersection point.

TopLeft

Returns the top left point of the specified rectangle.

TopRight

Returns the top right point of the specified rectangle.

UnionNonEmptyRects

Returns the smallest possible rectangle containing both of the specified rectangles, but only if the rectangles are non-empty.

UnionRects

Returns the smallest possible rectangle containing both of the specified rectangles.

 See Also

Utilities Class
MindFusion.Diagramming Namespace