MSFLineStyleBuilder
Objective-C
@interface MSFLineStyleBuilder : MSFStyleBuilder
Swift
class MSFLineStyleBuilder : MSFStyleBuilder
A builder class for LineStyle.
-
Constructs a LineStyleBuilder object with all parameters set to defaults.
Declaration
Objective-C
- (id)init;Swift
init!() -
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 length of the line. The default is “default_line.png”.
Declaration
Objective-C
- (void)setBitmap:(MSFBitmap *)bitmap;Swift
func setBitmap(_ bitmap: MSFBitmap!)Parameters
bitmapThe new bitmap for the line.
-
Returns the width of the line used for click detection.
Declaration
Objective-C
- (float)getClickWidth;Swift
func getClickWidth() -> FloatReturn 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;Swift
func setClickWidth(_ clickWidth: Float)Parameters
clickWidthThe new point size in dp.
-
Returns the end point type of the line.
Declaration
Objective-C
- (enum MSFLineEndType)getLineEndType;Swift
func getLineEndType() -> MSFLineEndTypeReturn 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 MSFLineEndType)lineEndType;Swift
func setLineEndType(_ lineEndType: MSFLineEndType)Parameters
lineEndTypeThe new line end point type.
-
Returns the join type of the line.
Declaration
Objective-C
- (enum MSFLineJoinType)getLineJoinType;Swift
func getLineJoinType() -> MSFLineJoinTypeReturn 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 MSFLineJoinType)lineJoinType;Swift
func setLineJoinType(_ lineJoinType: MSFLineJoinType)Parameters
lineJoinTypeThe new line join type.
-
Returns the stretch factor of the line.
Declaration
Objective-C
- (float)getStretchFactor;Swift
func getStretchFactor() -> FloatReturn 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;Swift
func setStretchFactor(_ stretchFactor: Float)Parameters
stretchFactorThe new relative stretching coefficient for the line.
-
Returns the width of the line.
Declaration
Objective-C
- (float)getWidth;Swift
func getWidth() -> FloatReturn 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;Swift
func setWidth(_ width: Float)Parameters
widthThe new line width in dp.
-
Builds a new instance of the LineStyle object using previously set parameters.
Return Value
A new LineStyle object.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()