LuciadCPillar 2023.1.04
|
Builder for the luciad::MilitarySymbolStyle class. More...
#include <luciad/symbology/military/MilitarySymbolStyle.h>
Public Member Functions | |
Builder (const Builder &other) | |
~Builder () | |
Builder & | affiliationColor (MilitarySymbol::Affiliation affiliation, Color affiliationColor) |
Sets the color for the given affiliation. More... | |
Builder & | affiliationColorEnabled (bool affiliationColorEnabled) |
Sets the affiliation color mode. More... | |
Builder & | alternateFillColor (Color alternateFillColor) |
Sets the alternate color to fill the part of the frame that is not covered by the fill percentage . More... | |
std::shared_ptr< MilitarySymbolStyle > | build () |
Creates a new MilitarySymbolStyle with the properties set on this builder. More... | |
Builder & | color (Color unaffiliatedColor) |
Sets the color to be used if affiliation colors have been disabled (see affiliationColorEnabled ) or if the symbol has no affiliation by default. More... | |
Builder & | cornerSmoothness (double smoothness) |
Sets the smoothness (or rounding) factor for polygon corners. More... | |
Builder & | fillEnabled (bool fillEnabled) |
Sets whether an icon symbol should be painted filled. More... | |
Builder & | fillPercentage (double fillPercentage) |
Sets the percentage ([0.0, 1.0]) of an icon symbol's frame that is painted with the regular fill color, as determined by its affiliation (see affiliationColor ). More... | |
Builder & | frameEnabled (bool frameEnabled) |
Sets whether the frame of an icon symbol should be painted. More... | |
Builder & | iconEnabled (bool iconEnabled) |
Sets whether the internal icon in the frame of an icon symbol should be painted. More... | |
Builder & | iconSize (size_t size) |
Sets the size of icon symbols in pixels. More... | |
Builder & | modifiersEnabled (bool modifiersEnabled) |
Sets whether modifiers should be enabled. More... | |
Builder & | overrideColor (Color color) |
Sets the color to be used for the icon symbol. More... | |
Builder & | strokeScaleFactor (double strokeScaleFactor) |
Sets the factor by which line widths should be scaled. More... | |
Builder & | surroundingRectangleColor (Color color) |
Sets the color of the rectangle that is painted around icon symbols. More... | |
Builder & | surroundingRectangleEnabled (bool enabled) |
Sets whether icon symbols should be painted with a surrounding rectangle. More... | |
Builder & | surroundingRectangleWidth (size_t width) |
Sets the line width in pixels of the rectangle that is painted around icon symbols. More... | |
Builder & | textStyle (TextStyle textStyle) |
Sets the new text style to be used for all texts part of the symbol. More... | |
Builder for the luciad::MilitarySymbolStyle class.
luciad::MilitarySymbolStyle::Builder::Builder | ( | const Builder & | other | ) |
luciad::MilitarySymbolStyle::Builder::~Builder | ( | ) |
Builder & luciad::MilitarySymbolStyle::Builder::affiliationColor | ( | MilitarySymbol::Affiliation | affiliation, |
Color | affiliationColor | ||
) |
Sets the color for the given affiliation.
These colors are used as fill color for framed icon symbols. For unframed icon symbols and line symbols, affiliation colors are only used when the affiliation color mode has been enabled (see affiliationColorEnabled
).
affiliation | The affiliation for which a color is set. |
affiliationColor | The color to be used for the given affiliation. |
Builder & luciad::MilitarySymbolStyle::Builder::affiliationColorEnabled | ( | bool | affiliationColorEnabled | ) |
Sets the affiliation color mode.
When this mode is enabled, the color for unframed icon symbols, line symbols and off-set lines of icon symbols are automatically be adapted to the affiliation of a symbol.
The default value is false
.
affiliationColorEnabled | The affiliation color mode. |
Sets the alternate color to fill the part of the frame that is not covered by the fill percentage
.
The default value is transparent (i.e. no fill).
alternateFillColor | the color to fill the part of the frame that is not covered by the fill percentage . |
std::shared_ptr< MilitarySymbolStyle > luciad::MilitarySymbolStyle::Builder::build | ( | ) |
Creates a new MilitarySymbolStyle
with the properties set on this builder.
MilitarySymbolStyle
with the properties set on this builder. Sets the color to be used if affiliation colors have been disabled (see affiliationColorEnabled
) or if the symbol has no affiliation by default.
The default value is black.
unaffiliatedColor | The color. |
Builder & luciad::MilitarySymbolStyle::Builder::cornerSmoothness | ( | double | smoothness | ) |
Sets the smoothness (or rounding) factor for polygon corners.
This factor must be a value inside the interval [0.0, 1.0]
.
By default, the smoothness is set to 0.5
.
smoothness | the smoothness (or rounding) factor for polygon corners. |
Builder & luciad::MilitarySymbolStyle::Builder::fillEnabled | ( | bool | fillEnabled | ) |
Sets whether an icon symbol should be painted filled.
The default value is true
.
fillEnabled | whether an icon symbol should be painted filled. |
Builder & luciad::MilitarySymbolStyle::Builder::fillPercentage | ( | double | fillPercentage | ) |
Sets the percentage ([0.0, 1.0]) of an icon symbol's frame that is painted with the regular fill color, as determined by its affiliation (see affiliationColor
).
The filled part begins at the bottom of the icon frame, up to the vertical position that corresponds with the given fill percentage. In other words, a fill percentage of 0.5 results in an icon symbol of which only the bottom half is filled with the regular fill color. The remaining (top) part of the icon is filled with the alternate fill color
.
The default value is 1.0f
.
fillPercentage | the fill percentage to fill the frame of icon symbols. |
Builder & luciad::MilitarySymbolStyle::Builder::frameEnabled | ( | bool | frameEnabled | ) |
Sets whether the frame of an icon symbol should be painted.
The default value is true
.
frameEnabled | whether the frame of an icon symbol should be painted. |
Builder & luciad::MilitarySymbolStyle::Builder::iconEnabled | ( | bool | iconEnabled | ) |
Sets whether the internal icon in the frame of an icon symbol should be painted.
The default value is true
.
iconEnabled | whether the internal icon in the frame of an icon symbol should be painted. |
Builder & luciad::MilitarySymbolStyle::Builder::iconSize | ( | size_t | size | ) |
Sets the size of icon symbols in pixels.
This value must be > 0. The default value is 64
.
size | the size of icon symbols in pixels. |
Builder & luciad::MilitarySymbolStyle::Builder::modifiersEnabled | ( | bool | modifiersEnabled | ) |
Sets whether modifiers should be enabled.
The default value is true
.
modifiersEnabled | whether modifiers should be enabled. |
Sets the color to be used for the icon symbol.
This overrides the affiliation and/or pattern colors in icons and tactical shapes. If this method is not invoked, there's no override color.
color | The color to be used for the icon symbol. |
Builder & luciad::MilitarySymbolStyle::Builder::strokeScaleFactor | ( | double | strokeScaleFactor | ) |
Sets the factor by which line widths should be scaled.
This setting can be used to increase or decrease the width of stroked lines in icons and tactical graphics. It also affects decoration sizes in tactical graphics.
The default value is 1
.
strokeScaleFactor | the factor by which line widths should be scaled. |
Sets the color of the rectangle that is painted around icon symbols.
color | the color of the rectangle that is painted around icon symbols. |
Builder & luciad::MilitarySymbolStyle::Builder::surroundingRectangleEnabled | ( | bool | enabled | ) |
Sets whether icon symbols should be painted with a surrounding rectangle.
The default value is false
.
enabled | whether icon symbols should be painted with a surrounding rectangle. |
Builder & luciad::MilitarySymbolStyle::Builder::surroundingRectangleWidth | ( | size_t | width | ) |
Sets the line width in pixels of the rectangle that is painted around icon symbols.
This value must be larger than 0
.
The default value is 1
.
A pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths).
width | the line width in pixels of the rectangle that is painted around icon symbols. |
Sets the new text style to be used for all texts part of the symbol.
luciad::MilitarySymbolStyle::getDefaultTextStyle
to get a correctly sized TextStyle.textStyle | new text style to be used for all texts part of the symbol. |