DirectAnimation Animated Header --Static Methods Relevant to Path2Bvr Objects DirectAnimation Animated Header --Static Methods Relevant to Path2Bvr Objects* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: Static Fields Relevant to NumberBvr Objects
*Next Topic: Static Methods Relevant to Point2Bvr Objects

Static Methods Relevant to Path2Bvr Objects



arc

Statics Class

Creates a Path2Bvr object representing a segment of an oval (In effect, an arc). The oval is centered at the origin.

public static Path2Bvr arc(
  NumberBvr startAngle,
  NumberBvr endAngle,
  NumberBvr arcWidth,
  NumberBvr arcHeight
  );

Parameters
startAngle
The NumberBvr object representing the starting angle of the arc, expressed in radians. This parameter can also be of type double.
endAngle
The NumberBvr object representing the ending angle of the arc, expressed in radians. This parameter can also be of type double.
arcWidth
The NumberBvr object representing the width of the arc, expressed in meters. This parameter can also be of type double.
arcHeight
The NumberBvr object representing the height of the arc, expressed in meters. This parameter can also be of type double.
Return Values

Returns the Path2Bvr object.


arcDegrees

Statics Class

Creates a Path2Bvr object representing a segment of an oval (In effect, this is an arc). The oval is centered at the origin.

public static Path2Bvr arcDegrees(
  double startAngle,
  double endAngle,
  double arcWidth,
  double arcHeight
  );

Parameters
startAngle
The double representing the starting angle of the oval segment, expressed in degrees.
endAngle
The double representing the ending angle of the oval segment, expressed in degrees.
arcWidth
The double representing the width of the arc, expressed in meters.
arcHeight
The double representing the height of the arc, expressed in meters.
Return Values

Returns the Path2Bvr object.


concat

Statics Class

Creates a path behavior that represents the concatenation of the given path behaviors. In the new path, the points of p1 occur first, followed by those of p2. Path p2 is transformed so that the first point of p2 aligns with the last point of p1.

public static Path2Bvr concat(
  Path2Bvr p1,
  Path2Bvr p2
  );

Parameters
p1 and p2
The Path2Bvr objects.
Return Values

Returns the Path2Bvrobject.


concatArray

Statics Class

Creates a path behavior that represents the concatenation of the Path2Bvr objects in the array. In the new path, the points of the first path in the array occur first, followed sequentially by the other paths in the array. The second path, for example, is transformed so that its first point aligns with the last point of the first path.

public static Path2Bvr concatArray(
  Path2Bvr[] paths
  );

Parameters
paths
The array of Path2Bvr objects.
Return Values

Returns the Path2Bvrobject.


cubicBSplinePath

Statics Class

Creates a Path2Bvr behavior based on a cubic B-spline curve. The curve depends on the control points and the knot vector, and requires that:


numberofPoints = numberofKnots - 2

The control points define the approximate direction and shape of the function. The knots represent the junction values, in parameter space, between the connected polynomial parts. For a number of knots k, the function is valid in the range [3, knotk-2], and is otherwise undefined.

public static Path2Bvr cubicBSplinePath(
  Point2Bvr[] points,
  NumberBvr[] knots
  );

Parameters
points
An array of Point2Bvr objects representing the points used to calculate the B-spline.
knots
An array of NumberBvr objects representing the knots used to calculate the B-spline.
Return Values

Returns the Path2Bvr object.


line

Statics Class

Creates a path behavior that represents the line segment defined by the given point behaviors.

public static Path2Bvr line(
  Point2Bvr p1,
  Point2Bvr p2
  );

Parameters
p1 and p2
The Point2Bvr objects.
Return Values

Returns the Path2Bvrobject.


oval

Statics Class

Creates a Path2Bvr object that represents an oval, centered about the origin, and whose width and height are described by the given NumberBvr arguments.

public static Path2Bvr oval(
  NumberBvr width,
  NumberBvr height
  );

Parameters
x-radius
The NumberBvr object representing the oval's width. This parameter can also be of type double.
y-radius
The NumberBvr object representing the oval's height. This parameter can also be of type double.
Return Values

Returns the Path2Bvr object.


pie

Statics Class

Creates a Path2Bvr object representing a closed path that traces a segment of an oval and connects it to the origin. (In effect, it is a pie-shaped wedge). The oval is centered at the origin.

public static Path2Bvr pie(
  NumberBvr startAngle,
  NumberBvr endAngle,
  NumberBvr arcWidth,
  arcHeight
  );

Parameters
startAngle
The NumberBvr object representing the starting angle of the oval segment, expressed in radians. This parameter can also be of type double.
endAngle
The NumberBvr object representing the ending angle of the oval segment, expressed in radians. This parameter can also be of type double.
arcWidth
The NumberBvr object representing the width of the arc, expressed in meters. This parameter can also be of type double.
arcHeight
The NumberBvr object representing the height of the arc, expressed in meters. This parameter can also be of type double.
Return Values

Returns the Path2Bvr object.


pieDegrees

Statics Class

Creates a Path2Bvr object representing a closed path that traces a segment of an oval and connects it to the origin. (In effect, it is a pie-shaped wedge). The oval is centered at the origin.

public static Path2Bvr pieDegrees(
  double startAngle,
  double endAngle,
  double arcWidth,
  double arcHeight
  );

Parameters
startAngle
The double representing the starting angle of the oval segment, expressed in degrees.
endAngle
The double representing the ending angle of the oval segment, expressed in degrees.
arcWidth
The double representing the width of the arc, expressed in meters.
arcHeight
The double representing the height of the arc, expressed in meters.
Return Values

Returns the Path2Bvr object.


polydrawPath

Statics Class

Creates a Path2Bvr object by manipulating the array of points with the codes contained in the NumberBvr array. The codes represent the instructions that can be OR'd together, where:
Code Name Meaning
01 PT_CLOSEFIGURE Connects points to create a closed figure.
02 PT_LINETO Connects points in a line.
04 PT_BEZIERTO Connects points in a Bezier curve. These must occur in multiples of 3.
06 PT_MOVETO Moves to a point. This is, implicitly, always the first instruction.

public static Path2Bvr polydrawPath(
  Point2Bvr[] points,
  NumberBvr[] codes
  );

Parameters
points
An array of Point2Bvr objects.
codes
An array of NumberBvr objects representing the instruction codes.
Return Values

Returns the Path2Bvr object.

Remarks

This function is equivalent to the Graphics Drawing Interface (GDI) polydraw function.


polyline

Statics Class

Creates a path behavior that consists of the given point behaviors. The path can be used either for drawing or animation. The default line style is the defaultLineStyle.

public static Path2Bvr polyline(
  Point2Bvr[] points
  );

Parameters
points
An array of Point2Bvr objects.
Return Values

Returns the Path2Bvr object.


ray

Statics Class

Creates a path behavior that represents the line segment from the origin to the given point behavior.

public static Path2Bvr ray(
  Point2Bvr p
  );

Parameters
p
The Point2Bvr object.
Return Values

Returns the Path2Bvrobject.


rect

Statics Class

Creates the Path2Bvr object representing a rectangle, centered at the origin.

public static Path2Bvr rect(
  NumberBvr width,
  NumberBvr height
  );

Parameters
width
The NumberBvr object representing the width of the rectangle. This parameter can also be of type double.
height
The NumberBvr object representing the height of the rectangle. This parameter can also be of type double.
Return Values

Returns the Path2Bvr object.


roundRect

Statics Class

Creates a Path2Bvr object that is a rectangle, centered about the origin, with rounded, rather than square, corners. The corners are considered to be segments of an oval (in effect, an arc), centered at the origin.

public static Path2Bvr roundRect(
  NumberBvr width,
  NumberBvr height,
  NumberBvr arcWidth,
  NumberBvr arcHeight
  );

Parameters
width
The NumberBvr object representing the rectangle's width. This parameter can also be of type double.
height
The NumberBvr object representing the rectangle's height. This parameter can also be of type double.
arcWidth
The NumberBvr object representing the width of the arc, expressed in meters. This parameter can also be of type double.
arcHeight
The NumberBvr object representing the height of the arc, expressed in meters. This parameter can also be of type double.
Return Values

Returns the Path2Bvr object.


stringPath

Statics Class

Creates a Path2Bvr object from the supplied StringBvr object. The appearance is specified by the FontStyleBvr object. The path behavior is useful for creating a matte to which an image behavior can be clipped.

public static Path2Bvr stringPath(
  StringBvr string,
  FontStyleBvr fs
  );

Parameters
string
The StringBvr object used to create the Path2Bvr object. This parameter can also be of type java.lang.String.
fs
The FontStyleBvr object specifying the appearance of the string.
Return Values

Returns the Path2Bvr object.

See Also

draw, fill

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page