Class ALspComplexStroke.TriangleBuilder
- Enclosing class:
ALspComplexStroke
ALspComplexStroke.filledTriangle()
.- Since:
- 2013.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new triangle stroke.Sets the fill color.fillTexture
(ILcdIcon aTextureIcon) Specifies an icon that is used to retrieve the fill color.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.p0
(double aX, double aY) Sets the first point of the trianglep1
(double aX, double aY) Sets the second point of the trianglep2
(double aX, double aY) Sets the third point of the trianglerelativeCoordinates
(boolean aRelative) When set totrue
, the coordinates defined inaXs
will be interpreted as relative coordinates.
-
Method Details
-
p0
Sets the first point of the triangle- Parameters:
aX
- the x-coordinates of the first point of the triangle.aY
- the y-coordinates of the first point of the triangle.- Returns:
this
-
p1
Sets the second point of the triangle- Parameters:
aX
- the x-coordinates of the second point of the triangle.aY
- the y-coordinates of the second point of the triangle.- Returns:
this
-
p2
Sets the third point of the triangle- Parameters:
aX
- the x-coordinates of the third point of the triangle.aY
- the y-coordinates of the third point of the triangle.- Returns:
this
-
relativeCoordinates
When set totrue
, the coordinates defined inaXs
will be interpreted as relative coordinates. I.e. coordinates defined relative to the length of the entire line (between [0, 1]).- Parameters:
aRelative
-true
to use relative coordinates- 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
-
lineColor
Sets the line color.- Parameters:
aColor
- 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
-
lineWidth
Sets the line width. The default is1
.- Parameters:
aLineWidth
- the line width.- Returns:
this
-
build
Creates a new triangle stroke.- Returns:
- a new triangle stroke.
-