public class Path2Bvr extends Behavior { // Methods public Bbox2Bvr boundingBox(LineStyleBvr style); public Path2Bvr close(); public ImageBvr draw(LineStyleBvr ls); public ImageBvr fill(LineStyleBvr ls, ImageBvr im ); public Path2Bvr transform(Transform2Bvr xf); public static Path2Bvr newUninitBvr(); }
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.
Creates a Path2Bvr object that is a visible bounding box.
public Bbox2Bvr boundingBox(
LineStyleBvr style
);
Returns the Path2Bvr object.
Adds a line segment from the end of the path to the start. This method is useful for animating closed regions.
public Path2Bvr close( );
Returns the Path2Bvr object.
Renders the Path2Bvr object into an ImageBvr object. The image is unfilled, which means only the outline is rendered.
public ImageBvr draw(
LineStyleBvr ls
);
Returns the ImageBvr object.
Renders the Path2Bvr object into an ImageBvr object. The ls argument specifies the LineStyleBvr that is used to draw the outline. The im parameter specifies the image used to fill in the new ImageBvr object.
public ImageBvr fill(
LineStyleBvr ls,
ImageBvr im );
Returns the ImageBvr object.
Creates a new path behavior that is the result of applying the given transformation behavior to the points in the original path behavior.
public Path2Bvr transform(
Transform2Bvr xf
);
Returns the Path2Bvr object.
This attribute composes values.
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.
public static Path2Bvr newUninitBvr( );
Returns the Path2Bvr object.
The following methods are defined in the Statics class and are most relevant for objects of type Path2Bvr.
public static Path2Bvr concat(Path2Bvr p1, Path2Bvr p2);
public static Path2Bvr concatArray(Path2Bvr[] paths);
public static Path2Bvr cubicBSplinePath(Point2Bvr[], NumberBvr[]);
public static Path2Bvr line(Point2Bvr p1, Point2Bvr p2);
public static Path2Bvr oval(NumberBvr width, NumberBvr height)
public static Path2Bvr polydrawPath(Point2Bvr[] points, NumberBvr[] codes);
public static Path2Bvr polyline(Point2Bvr[] points);
public static Path2Bvr ray(Point2Bvr p);
public static Path2Bvr rect(NumberBvr width, NumberBvr height);
public static Path2Bvr stringPath(StringBvr string, FontStyleBvr fs);
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.