Creates a pattern containing an icon.
More...
#include <luciad/layers/styles/complexstrokes/builders/IconPatternBuilder.h>
Creates a pattern containing an icon.
The icon must be set by calling the icon method before calling build. All other methods are optional.
- See also
ComplexStrokePatternFactory::iconBuilder()
- Since
- 2023.1
◆ build()
◆ icon()
Sets the icon to be displayed.
May not be nullptr
.
- Parameters
-
icon | the icon to be displayed. |
- Returns
- this builder.
- Exceptions
-
◆ offset()
Sets the offset of the icon, relative to the base line, in pixels.
Defaults to 0
.
- Parameters
-
offset | the offset of the icon. |
- Returns
- this builder.
◆ opacity()
The opacity of the icon, determines how transparent an icon will be painted.
It needs to be specified between 0
and 1
. 0
indicates that the icon is painted completely transparent and 1
indicates that the original opacity of the icon is used.
- Parameters
-
opacity | the icon's opacity in the [0,1] interval, defaults to 1. |
- Returns
- this builder.
- Exceptions
-
◆ rotateUp()
Indicates if the icon should be flipped when it is turned upside down.
Defaults to false.
- Parameters
-
rotateUp | Indicates if the icon should be flipped when it is turned upside down. |
- Returns
- this builder.
◆ rotation()
The rotation angle around the center of the icon's image, specified in degrees.
Rotations are applied in a clock-wise fashion relatively to the direction of the underlying line. When rotateUp
is set to true, the flipping occurs on the already rotated icon. The default is 0
, which implies the icon is not rotated.
- Parameters
-
rotation | the rotation, defaults to 0 degrees. |
- Returns
- this builder.
◆ scale()
Sets the factor by which the icon will be scaled.
Defaults to 1
(no scaling).
- Parameters
-
- Returns
- this builder.
- Exceptions
-