DirectX Media for Animation Java Reference Previous
Previous
Classes
Classes
Index
Index
Next
Next

Path2Bvr Class

Methods

public class Path2Bvr extends Behavior {
    
    // Methods
    public Path2Bvr transform(Transform2Bvr xf);

    public static Path2Bvr concat(Path2Bvr p1, Path2Bvr p2);
    public static Path2Bvr line(Point2Bvr p1, Point2Bvr p2);
    public static Path2Bvr newUninitBvr();
    public static Path2Bvr polyline(Point2Bvr[] points);
    public static Path2Bvr ray(Point2Bvr p);
}

Creates an object that represents a path behavior for two-dimensional space. A path behavior consists of a sequence of two-dimensional point behaviors and is typically used to draw images consisting of line segments or to define borders for geometric shapes.

For more information about behaviors, see the Behavior class.


Methods


transform

public Path2Bvr transform(Transform2Bvr xf);

Creates a new path behavior that is the result of applying the given transformation behavior to the points in the original path behavior.

Return Value:

Returns the Path2Bvr object.

ParameterDescription
a The Transform2Bvr object representing the transformation to apply to the original path.

Remarks:

This attribute composes values.


concat

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

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.

Return Value:

Returns the Path2Bvrobject.

ParameterDescription
p1 and p2 The Path2Bvr objects.


line

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

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

Return Value:

Returns the Path2Bvrobject.

ParameterDescription
p1 and p2 The Point2Bvr objects.


newUninitBvr

public static Path2Bvr newUninitBvr();

This method allows you to refer to an Path2Bvr behavior before that behavior has been defined. With this method you can create the behavior and use it in the definition of other behaviors, but not actually define its contents until some later point. (This is accomplished with the init method, which is available on all behaviors.) The system generates a run-time error if you initialize a non-uninitialized behavior, initialize an uninitialized behavior that has already been initialized, or run an initialized behavior that has not yet been initialized.

Return Value:

Returns the Path2Bvr object.


polyline

public static Path2Bvr polyline(int numPts, Point2Bvr[] points);

Creates a path behavior that consists of the given point behaviors. The default line-style has flat ends, a beveled join, a solid dash, a path not closed, and a width of 2 points (.00706 meters or 2/72 inches).

Return Value:

Returns the Path2Bvr object.

ParameterDescription
numPts The number of point behaviors in the array points.
points An array of Point2Bvr objects.


ray

public static Path2Bvr ray(Point2Bvr p);

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

Return Value:

Returns the Path2Bvrobject.

ParameterDescription
p The Point2Bvr object.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.