Foundation > Graphic Resources > IlvLineStyle: The Line Style Class
 
IlvLineStyle: The Line Style Class
You can create your own line styles by requesting IlvLineStyle resource objects from your IlvDisplay object and specifying the way dashes are to be drawn.
A line style is an array of unsigned characters returned by the member function getDashes. The length of the array is returned by the getCount member function. This array must not be modified or deleted by the user.
Starting with the “pen down,” Rogue Wave® Views draws the number of foreground-colored pixels that is indicated by the first element of the getDashes array. Then, the second element indicates the number of pixels to be skipped before the drawing starts up again until the array is completely read. Then, the loop begins again. The getOffset member function returns the number of pixels to be skipped before the loop restarts.
New Line Styles
You can create your own line styles by requesting IlvLineStyle resource objects from your IlvDisplay object and specifying the way dashes are to be drawn.
Line styles can be named. To obtain a new line style, use the following member functions of the class IlvDisplay:
IlvLineStyle* getLineStyle(IlUShort count,
const unsigned char* dashes,
IlUShort offset = 0);
IlvLineStyle* getLineStyle(const char* name) const;
The class IlvDisplay provides a set of predefined line styles that you can obtain using their name:
Figure 3.2    Line Styles

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.