WebPlanner 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

AddPoints

Adds two points. In .NET 2.0 PointF.Offset() may be used instead.

AddRoundRect

Creates a graphics path of a rounded rectangle with the specified dimensions and round radius.

ApproxBezier

Approximates the specified Bézier curve with a polyline. The specified quality parameter varies in the interval [1, ...) and is proportional to the number of points in the resulting polyline.

CalcBezierCoef

 

Ccw

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

CompareFiles

Compares two files.

CompareStreams

Compares two streams. The streams should the buffered for performance. The streams are not closed.

DeviceToDoc

Overloaded.  

Distance

Calculates the distance between the specified points.

DistToBezier

Calculates the shortest distance from the specified point to the specified Bézier curve.

DistToLineSegment

Calculates distance from the specified point to the specified line segment

DistToPolyline

Overloaded.  

DistToRect

Calculates distance from the specified point to the specified rectangle

DocToDevice

Overloaded.  

DocToDeviceF

Overloaded.  

DrawImage

Overloaded.  

FindAncestor

Finds visual tree ancestor of the specified type

FromLTRB

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

GetBezierPt

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

GetEllipseIntr

 

GetNearestPt

Calculates the orthogonal projection of the specified point on the line defined be the specified point pair.

GetRectIntr

 

GetRoundRect

Creates a graphics path of a rounded rectangle with the specified dimensions and round radius.

Intersect

Determines whether the specified line segments intersect.

LineIntersect

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

NormalizeRect

Overloaded.  

PointInEllipse

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

PointInPolygon

Determines if the specified point is within the specified polygon.

PointInPolyRect

 

PointInRect

Checks whether the specified rectangle contains the specified point.

PointInSegment

Checks whether the line segment defined by the specified points contain the specified point.

SaveImage

Saves an image to the specified file.

SaveToFile

Overloaded.  

SegmentIntersect

 

ToPoint

Converts MouseEventArgs to point for easy manipulation.

TransformRect

Overloaded.  

 See Also