    Contents  Index  Topic Contents
    Previous Topic: PairObject Class
    Next Topic: PickableGeometry Class

> ## Path2Bvr Class

>     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.

> - Path2Bvr Methods
> - Relevant Methods from the Statics Class

> ### Path2Bvr Methods

> boundingBox

> close

> draw

> fill

> transform

> newUninitBvr

> ####

> boundingBox

> Path2Bvr Class

> Creates a Path2Bvr object that is a visible bounding box.

> public Bbox2Bvr boundingBox(
> LineStyleBvr style
> );

> ##### Parameters

> style
>   The LineStyleBvr object that defines the line style of the path. This argument is ignored. The linestyle is always the default linestyle and has a width of 0.

> ##### Return Values

> Returns the Path2Bvr object.

> ####

> close

> Path2Bvr Class

> Adds a line segment from the end of the path to the start. This method is useful for animating closed regions.

> public Path2Bvr close( );

> ##### Return Values

> Returns the Path2Bvr object.

> ####

> draw

> Path2Bvr Class

> Renders the Path2Bvr object into an ImageBvr object. The image is unfilled, which means only the outline is rendered.

> public ImageBvr draw(
> LineStyleBvr ls
> );

> ##### Parameters

> ls
>   The LineStyleBvr used to render the image.

> ##### Return Values

> Returns the ImageBvr object.

> ####

> fill

> Path2Bvr Class

> 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 );

> ##### Parameters

> ls
>   The LineStyleBvr object used to draw the path.
> im
>   The ImageBvr object used as the fill pattern.

> ##### Return Values

> Returns the ImageBvr object.

> ####

> transform

> Path2Bvr Class

> 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
> );

> ##### Parameters

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

> ##### Return Values

> Returns the Path2Bvr object.

> ##### Remarks

> This attribute composes values.

> ####

> newUninitBvr

> Path2Bvr Class

> 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( );

> ##### Return Values

> Returns the Path2Bvr object.

> ### Relevant Methods from the Statics Class

> The following methods are defined in the Statics class and are most relevant for objects of type Path2Bvr.

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

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

> 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 pie(NumberBvr startAngle, NumberBvr endAngle, NumberBvr arcWidth, NumberBvr arcHeight);

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

> 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 roundRect(NumberBvr width, NumberBvr height, NumberBvr arcWidth, NumberBvr arcHeight);

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

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

> Top of Page