Class ALspComplexStroke.LineBuilder
- Enclosing class:
ALspComplexStroke
ALspComplexStroke.line()
and ALspComplexStroke.filledLine()
.- Since:
- 2013.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new line stroke.Sets the fill color.fillTexture
(ILcdIcon aTextureIcon) Specifies an icon that is used to retrieve the fill color.length
(double aLengthFixed) Sets the length of this stroke, in pixels.lengthRelative
(double aLengthRelative) Sets the length of this stroke, as a value relative to the length of the line.Sets the line color.lineTexture
(ILcdIcon aTextureIcon) Specifies an icon that is used to retrieve the line color.lineWidth
(double aLineWidth) Sets the line width.offset
(double aOffset0, double aOffset1) Sets the offsets of the first and second point of the line segment, relative to the base line.offset0
(double aOffset0) Sets the the offset of the first point of the segment, relative to the base line.offset1
(double aOffset1) Sets the offset of the second point of the segment, relative to the base line.
-
Method Details
-
length
Sets the length of this stroke, in pixels. The default is10
. Note that when this method is called, the value set usinglengthRelative
is ignored.- Parameters:
aLengthFixed
- the length of this stroke, in pixels- Returns:
this
-
lengthRelative
Sets the length of this stroke, as a value relative to the length of the line. The default is0
. Note that when this method is called, the value set usinglength
is ignored.- Parameters:
aLengthRelative
- a length, defined relative ([0, 1]) to the length of the entire line, representing the part of the line occupied by this gap.- Returns:
this
-
offset0
Sets the the offset of the first point of the segment, relative to the base line. The default is0
.- Parameters:
aOffset0
- the offset, relative to the base line- Returns:
this
-
offset1
Sets the offset of the second point of the segment, relative to the base line. The default is0
.- Parameters:
aOffset1
- the offset, relative to the base line- Returns:
this
-
offset
Sets the offsets of the first and second point of the line segment, relative to the base line. This method is short for callingoffset0(double)
andoffset1(double)
.- Parameters:
aOffset0
- the offset of the first point, relative to the base lineaOffset1
- the offset of the second point, relative to the base line- Returns:
this
-
lineWidth
Sets the line width. The default is1
.- Parameters:
aLineWidth
- the line width.- Returns:
this
-
lineColor
Sets the line color.- Parameters:
aLineColor
- the line color- Returns:
this
-
lineTexture
Specifies an icon that is used to retrieve the line color. This texture icon is sampled in view space, i.e. one pixel of the icon corresponds with one pixel on the screen. If a line color is set as well, that color is used as a modulation color. For best results, the given icon should be tileable, see for example
TLcdGXYHatchedFillStyle.asIcon()
.- Parameters:
aTextureIcon
- a texture icon- Returns:
this
-
fillColor
Sets the fill color.- Parameters:
aFillColor
- the fill color- Returns:
- this;
-
fillTexture
Specifies an icon that is used to retrieve the fill color. This texture icon is sampled in view space, i.e. one pixel of the icon corresponds with one pixel on the screen. If a fill color is set as well, that color is used as a modulation color. For best results, the given icon should be tileable, see for example
TLcdGXYHatchedFillStyle.asIcon()
.When using a textured fill along the entire stroked line, it may be useful to change the sharp angle threshold. This makes it possible to avoid gaps or overlapping regions between line segments.
- Parameters:
aTextureIcon
- a texture icon- Returns:
this
-
build
Creates a new line stroke.- Returns:
- a new line stroke.
-