LuciadCPillar 2023.1.04
luciad::ParallelLinePatternBuilder Class Reference

Creates a pattern with a line segment shape that is parallel to the base line. More...

#include <luciad/layers/styles/complexstrokes/builders/ParallelLinePatternBuilder.h>

Public Member Functions

ComplexStrokePattern build ()
 Build the parallel line pattern as configured. More...
 
ParallelLinePatternBuilderfixedLength (double fixedLength)
 Set the length of the pattern in pixels. More...
 
ParallelLinePatternBuilderlineColor (Color color)
 Sets the line color. More...
 
ParallelLinePatternBuilderlineWidth (double lineWidth)
 Sets the line width. More...
 
ParallelLinePatternBuilderoffset (double offset)
 Sets the offset of the line, relative to the base line, in pixels. More...
 
ParallelLinePatternBuilderrelativeLength (double relativeLength)
 Set the length of the pattern relative to the length of the entire line, as a value between 0 and 1. More...
 

Detailed Description

Creates a pattern with a line segment shape that is parallel to the base line.

See also
ComplexStrokePatternFactory::parallelLineBuilder()
Since
2023.1

Member Function Documentation

◆ build()

ComplexStrokePattern luciad::ParallelLinePatternBuilder::build ( )

Build the parallel line pattern as configured.

Returns
the ComplexStrokePattern.

◆ fixedLength()

ParallelLinePatternBuilder & luciad::ParallelLinePatternBuilder::fixedLength ( double  fixedLength)

Set the length of the pattern in pixels.

The length cannot be both fixed and relative, if both methods are used, only the last one affects the result.

If no length is set, a 10 pixel fixed length will be used as default.

Parameters
fixedLengththe length in pixels.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionfixedLength must be >=0.

◆ lineColor()

ParallelLinePatternBuilder & luciad::ParallelLinePatternBuilder::lineColor ( Color  color)

Sets the line color.

Parameters
colorthe line's color, defaults to black.
Returns
this builder.

◆ lineWidth()

ParallelLinePatternBuilder & luciad::ParallelLinePatternBuilder::lineWidth ( double  lineWidth)

Sets the line width.

Parameters
lineWidththe line's width, defaults to 1.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionlineWidth must be >0.

◆ offset()

ParallelLinePatternBuilder & luciad::ParallelLinePatternBuilder::offset ( double  offset)

Sets the offset of the line, relative to the base line, in pixels.

Parameters
offsetthe offset in pixels. Defaults to 0.
Returns
this builder.

◆ relativeLength()

ParallelLinePatternBuilder & luciad::ParallelLinePatternBuilder::relativeLength ( double  relativeLength)

Set the length of the pattern relative to the length of the entire line, as a value between 0 and 1.

The length cannot be both fixed and relative, if both methods are used, only the last one affects the result.

If no length is set, a 10 pixel fixed length will be used as default.

Parameters
relativeLengtha value in [0,1].
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionrelativeLength must be in range [0,1].