LuciadCPillar 2023.1.04
luciad::RectanglePatternBuilder Class Reference

Creates a pattern with a rectangle shape. More...

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

Public Member Functions

ComplexStrokePattern build ()
 Build the rectangle pattern as configured. More...
 
RectanglePatternBuilderfillColor (Color color)
 Sets the fill color. More...
 
RectanglePatternBuilderfixedLength (double fixedLength)
 Set the length of the pattern in pixels. More...
 
RectanglePatternBuilderlineColor (Color color)
 Sets the line color. More...
 
RectanglePatternBuilderlineWidth (double lineWidth)
 Sets the line width. More...
 
RectanglePatternBuildermaxHeight (double maxHeight)
 Sets the maximum height of the rectangle, in pixels, relative to the base line. More...
 
RectanglePatternBuilderminHeight (double minHeight)
 Sets the minimum height of the rectangle, in pixels, relative to the base line. More...
 
RectanglePatternBuilderrelativeLength (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 rectangle shape.

See also
ComplexStrokePatternFactory::rectangleBuilder()
Since
2023.1

Member Function Documentation

◆ build()

ComplexStrokePattern luciad::RectanglePatternBuilder::build ( )

Build the rectangle pattern as configured.

Returns
the ComplexStrokePattern.

◆ fillColor()

RectanglePatternBuilder & luciad::RectanglePatternBuilder::fillColor ( Color  color)

Sets the fill color.

Parameters
colorthe fill color, by default there is no fill.
Returns
this builder.

◆ fixedLength()

RectanglePatternBuilder & luciad::RectanglePatternBuilder::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()

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

Sets the line color.

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

◆ lineWidth()

RectanglePatternBuilder & luciad::RectanglePatternBuilder::lineWidth ( double  lineWidth)

Sets the line width.

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

◆ maxHeight()

RectanglePatternBuilder & luciad::RectanglePatternBuilder::maxHeight ( double  maxHeight)

Sets the maximum height of the rectangle, in pixels, relative to the base line.

This is typically a positive value.

Parameters
maxHeightthe maximum height, defaults to 5.
Returns
this builder.

◆ minHeight()

RectanglePatternBuilder & luciad::RectanglePatternBuilder::minHeight ( double  minHeight)

Sets the minimum height of the rectangle, in pixels, relative to the base line.

This is typically a negative value.

Parameters
minHeightthe minimum height, defaults to -5.
Returns
this builder.

◆ relativeLength()

RectanglePatternBuilder & luciad::RectanglePatternBuilder::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].