NTLineStyleBuilder
@interface NTLineStyleBuilder : NTStyleBuilder
A builder class for LineStyle.
-
Constructs a LineStyleBuilder object with all parameters set to defaults.
Declaration
Objective-C
- (id)init;
-
Returns the bitmap of the line.
Declaration
Objective-C
- (NTBitmap *)getBitmap;
Return Value
The bitmap of the line.
-
Sets the bitmap that will be used for drawing the line. The bitmap will be stretched horizontally to match the width of the line and repeated vertically along the lengtht of the line. The default is “default_line.png”.
Declaration
Objective-C
- (void)setBitmap:(NTBitmap *)bitmap;
Parameters
bitmap
The new bitmap for the line.
-
Returns the width of the line used for click detection.
Declaration
Objective-C
- (float)getClickWidth;
Return Value
The width of the line used for click detection.
-
Sets the width for the line that will be used for click detection. Units are screen density independent pixels (DP or DIP). If set to -1 the click width will be calculated automatically. The default is -1.
Declaration
Objective-C
- (void)setClickWidth:(float)clickWidth;
Parameters
clickWidth
The new point size in dp.
-
Returns the end point type of the line.
Declaration
Objective-C
- (enum NTLineEndType)getLineEndType;
Return Value
The end point type of the line.
-
Sets the style in which the end points of the line will be drawn. The default is LineEndType::ROUND.
Declaration
Objective-C
- (void)setLineEndType:(enum NTLineEndType)lineEndType;
Parameters
lineEndType
The new line end point type.
-
Returns the join type of the line.
Declaration
Objective-C
- (enum NTLineJoinType)getLineJoinType;
Return Value
The join type of the line.
-
Sets the style in which the line segments will be connected with each other. The default is LineJoinType::MITER.
Declaration
Objective-C
- (void)setLineJoinType:(enum NTLineJoinType)lineJoinType;
Parameters
lineJoinType
The new line join type.
-
Returns the stretch factor of the line.
Declaration
Objective-C
- (float)getStretchFactor;
Return Value
The stretch factor of the line.
-
Sets the relative stretching coefficient for the line. The bitmap of the line will be stretched vertically by the stretch factor and then repeated along the length of the line. For example, setting the stretch factor to 2.0 will stretch the bitmap vertically to double the original height and reduces the number of times the bitmap gets repeated by half. The default is 1.0.
Declaration
Objective-C
- (void)setStretchFactor:(float)stretchFactor;
Parameters
stretchFactor
The new relative stretching coefficient for the line.
-
Returns the width of the line.
Declaration
Objective-C
- (float)getWidth;
Return Value
The width of the line in dp.
-
Sets the width of line in screen density independent pixels (DP or DIP). The default is 12.
Declaration
Objective-C
- (void)setWidth:(float)width;
Parameters
width
The new line width in dp.
-
Builds a new instance of the LineStyle object using previously set parameters.
Declaration
Objective-C
- (NTLineStyle *)buildStyle;
Return Value
A new LineStyle object.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;