LuciadCPillar 2023.1.04
|
Creates a pattern with a polyline shape. More...
#include <luciad/layers/styles/complexstrokes/builders/PolylinePatternBuilder.h>
Public Member Functions | |
ComplexStrokePattern | build () |
Build the polyline pattern as configured. More... | |
PolylinePatternBuilder & | lineColor (Color color) |
Sets the line color. More... | |
PolylinePatternBuilder & | lineWidth (double lineWidth) |
Sets the line width. More... | |
PolylinePatternBuilder & | points (const std::vector< Coordinate > &points) |
Sets the points of the polyline. More... | |
PolylinePatternBuilder & | relative (bool relative) |
Whether the x coordinates of the points need to be interpreted as pixel values or relative values. More... | |
Creates a pattern with a polyline shape.
The polyline's points must be set by calling the points method before calling build. All other methods are optional.
ComplexStrokePattern luciad::PolylinePatternBuilder::build | ( | ) |
Build the polyline pattern as configured.
luciad::LogicException | when the points have not been set. |
PolylinePatternBuilder & luciad::PolylinePatternBuilder::lineColor | ( | Color | color | ) |
Sets the line color.
color | the line's color, defaults to black. |
PolylinePatternBuilder & luciad::PolylinePatternBuilder::lineWidth | ( | double | lineWidth | ) |
Sets the line width.
lineWidth | the line's width, defaults to 1 . |
luciad::InvalidArgumentException | lineWidth must be >0 . |
PolylinePatternBuilder & luciad::PolylinePatternBuilder::points | ( | const std::vector< Coordinate > & | points | ) |
Sets the points of the polyline.
Depending on the option relative
, the x coordinates are interpreted as pixel value, or as coordinates relative ([0, 1]
) to the length of the entire line. the Y coordinates are always pixel values.
The coordinates are defined locally, so for example to define a line of length 10, the following coordinates can be used: (0,0), (10,0).
There must be at least 2 points.
points | the points that make up the polyline. |
luciad::InvalidArgumentException | when the amount of points is lower than 2. |
PolylinePatternBuilder & luciad::PolylinePatternBuilder::relative | ( | bool | relative | ) |
Whether the x coordinates of the points need to be interpreted as pixel values or relative values.
Defaults to false.
relative | whether the x coordinates need to be interpreted as relative values. |