Creates a DALineStyle object that represents a potentially animated line style. The object defines the various line styles to use when drawing lines. These styles include: the shape of the end of a line; the shape of joints between intersecting lines; the width of the line; and whether the line is drawn with a continuous stroke or as a sequence of dashes.
Microsoft® Windows NT® supports all dash styles. Microsoft Windows® 98 supports only solid and dashed line styles. In Windows 98 the dash style is available only for detail lines. Detail lines are always one pixel thick. Thick lines are any lines that aren't detail lines. Thick lines, also called geometric lines or fat lines, must be solid lines in Windows 98.
Use DALineStyle objects with the Draw function in the DAPath2 class.
This class inherits from DABehavior.
For relevant properties from the DAStatics class, see DAStatics Properties Relevant to DALineStyle Objects.
DALineStyle Functions
AntiAliasing Determines whether the line will be antialiased. Color Determines the color of a DALineStyle object. DashStyle Creates a DALineStyle object with the specified dash style. Detail Creates a detail DALineStyle object from an existing line style. EndStyle Creates a DALineStyle object with the specified end style. JoinStyle Creates a DALineStyle object with the specified join style. Width Creates a DANumber object from an existing line style by setting the width of line to the given amount, expressed in points. Same as WidthAnim except that width is a nonanimated number (a double). WidthAnim Creates a DANumber object from an existing line style by setting the width of line to the given amount, expressed in points.
Determines whether the line will be antialiased.
Syntax
linestyleObj.AntiAliasing( antialias )
Parameters
- antialias
- A double value that can be either 0 or 1. If antialias is 0 (the default), there is no antialiasing. If it is 1, there is antialiasing.
Return Value
Returns the DALineStyle object.
Determines the color of a DALineStyle object. The default color is Black.
Syntax
linestyleObj.Color( color )
Parameters
Return Value
Returns the DALineStyle object.
Creates a DALineStyle object with the dash style specified in ds. By default, the dash style is solid.
Note this function can be used only with Microsoft DirectAnimation® version 6.x or later.
Syntax
linestyleObj.DashStyle( ds )
Parameters
- ds
- The dash style to apply. Choose one of the following values:
- DASHSTYLE_SOLID = 0
- DASHSTYLE_DASH = 1
- DASHSTYLE_DOT = 2
- DASHSTYLE_DASHDOT = 3
- DASHSTYLE_DASHDOTDOT = 4
- DASHSTYLE_NULL = 5
Return Value
Returns the DALineStyle object.
Remarks
Windows® 98 only supports solid and dashed dash styles (DASHSTYLE_SOLID and DASHSTYLE_DASH). In Windows® 98, the dash style doesn't work on thick lines. Windows NT® supports all dash styles.
The following code sets the line style of newLs to dotted.
newLs = oldLs.DashStyle(2);
Creates a detail DALineStyle object from an existing line style. A detail line style is not changed by image scaling operations. The detail line style is the default line style, and is one pixel wide.
Syntax
linestyleObj.Detail( )
Return Value
Returns the DALineStyle object.
Creates a DALineStyle with the end style specified in es. By default, the end style is round.
Note this function can be used only with DirectAnimation version 6.x or later.
Syntax
linestyleObj.EndStyle( es )
Parameters
- es
- The end style to apply. Choose one of the following values:
- ENDSTYLE_ROUND = 0
- ENDSTYLE_SQUARE = 1
- ENDSTYLE_FLAT = 2
Return Value
Returns the DALineStyle object.
Remarks
The following code sets the end style of newLs to square.
newLs = oldLs.EndStyle(1);
Creates a DALineStyle object with the join style specified in js. By default, the join style is round.
Note this function can be used only with DirectAnimation version 6.x or later.
Syntax
linestyleObj.JoinStyle( js )
Parameters
- js
- The join style to apply. Choose one of the following values:
- JOINSTYLE_ROUND = 0
- JOINSTYLE_BEVEL = 1
- JOINSTYLE_MITER = 2
Return Value
Returns the DALineStyle object.
Remarks
The following code sets the join style of newLs to miter.
newLs = oldLs.JoinStyle(2);
Creates a DALineStyle object by setting the width of line to the given amount, expressed in points. Same as WidthAnim except that width is a nonanimated number (a double).
Syntax
linestyleObj.Width( width )
Parameters
- width
- A double value that represents the width of the line. This is a nonanimated number.
Return Value
Returns the DALineStyle object.
Remarks
This function overrides Detail.
Creates a DALineStyle object by setting the width of line to the given amount, expressed in points. If the width results in a line less than a single pixel, the line is always drawn as a detail line.
Syntax
linestyleObj.WidthAnim( width )
Parameters
- width
- A DANumber object that represents the width of the line. This must be an animated number.
Return Value
Returns the DALineStyle object.
Remarks
This function overrides Detail.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.