LuciadCPillar 2023.1.04
luciad::ArcPatternBuilder Class Reference

Creates a pattern with an arc, ellipse or circle shape. More...

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

Public Member Functions

ArcPatternBuilderangle (double angle)
 Specifies that only a part of the ellipse should be used, creating an arc. More...
 
ComplexStrokePattern build ()
 Build the arc pattern as configured. More...
 
ArcPatternBuilderfillColor (Color color)
 Sets the fill color. More...
 
ArcPatternBuilderfixedLength (double fixedLength)
 Set the length of the pattern in pixels. More...
 
ArcPatternBuilderlineColor (Color color)
 Sets the line color. More...
 
ArcPatternBuilderlineWidth (double lineWidth)
 Sets the line width. More...
 
ArcPatternBuilderminorRadius (double radius)
 The minor radius is the distance from the baseline to the top/bottom of the arc. More...
 
ArcPatternBuilderoffset (double offset)
 Sets the offset of the arc, relative to the base line, in pixels. More...
 
ArcPatternBuilderrelativeLength (double relativeLength)
 Set the length of the pattern relative to the length of the entire line, as a value between 0 and 1. More...
 
ArcPatternBuilderstartAngle (Angle startAngle)
 This determines at which point on the ellipse the arc begins. More...
 

Detailed Description

Creates a pattern with an arc, ellipse or circle shape.

See also
ComplexStrokePatternFactory::arcBuilder()
Since
2023.1

Member Function Documentation

◆ angle()

ArcPatternBuilder & luciad::ArcPatternBuilder::angle ( double  angle)

Specifies that only a part of the ellipse should be used, creating an arc.

The part of the ellipse that will be drawn starts at startAngle and ends at startAngle + angle

Parameters
angleThe angle of the arc, defaults to 360 degrees for a full ellipse.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionangle must be >=0.

◆ build()

ComplexStrokePattern luciad::ArcPatternBuilder::build ( )

Build the arc pattern as configured.

Returns
the ComplexStrokePattern.

◆ fillColor()

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

Sets the fill color.

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

◆ fixedLength()

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

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

Sets the line color.

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

◆ lineWidth()

ArcPatternBuilder & luciad::ArcPatternBuilder::lineWidth ( double  lineWidth)

Sets the line width.

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

◆ minorRadius()

ArcPatternBuilder & luciad::ArcPatternBuilder::minorRadius ( double  radius)

The minor radius is the distance from the baseline to the top/bottom of the arc.

Parameters
radiusThe minor radius of the arc, in pixels. Defaults to 10.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionradius must be >0.

◆ offset()

ArcPatternBuilder & luciad::ArcPatternBuilder::offset ( double  offset)

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

Defaults to 0.

Parameters
offsetThe offset of the arc.
Returns
this builder.

◆ relativeLength()

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

◆ startAngle()

ArcPatternBuilder & luciad::ArcPatternBuilder::startAngle ( Angle  startAngle)

This determines at which point on the ellipse the arc begins.

A startAngle of 0 is on the baseline and the arc goes counter clockwise.

Parameters
startAngleThe start angle of the arc, defaults to 0 degrees.
Returns
this builder.