API / geotoolkit / renderer / LineMetrics / LineMetrics
renderer.LineMetrics.LineMetrics
Defines helper methods to work with line style
Constructors
- [new LineMetrics(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.renderer.linemetrics.linemetrics.md#new linemetrics(options))
Properties
Methods
Properties
▪ Static getLineWidth: (lineStyle: LineStyle, destUnit: AbstractUnit, pixelScale?: number) => number
▸ (lineStyle, destUnit, pixelScale?): number
Returns line width in dest units
| Name | Type | Description |
|---|---|---|
lineStyle | LineStyle | the line style |
destUnit | AbstractUnit | dest unit |
Optional pixelScale | number | pixel scale |
number
Methods
▸ getClassName(): string
string
▸ getLineWidth(lineStyle, destUnit, pixelScale?): number
Returns line width in dest units
| Name | Type | Description |
|---|---|---|
lineStyle | LineStyle | the line style |
destUnit | AbstractUnit | dest unit |
Optional pixelScale | number | pixel scale |
number
line width
▸ getMeasureLineStrategy(): LineMetricsStrategy
Returns the strategy to use when measuring line width
line width measuring strategy
▸ setMeasureLineStrategy(strategy): LineMetrics
Sets the strategy to use when measuring line width This function sets the 'getLineWidth' function according to the strategy
| Name | Type |
|---|---|
strategy | LineMetricsStrategy |
this
▸ Static getClassName(): string
string
▸ Static getMeasureLineStrategy(): LineMetricsStrategy
Returns the strategy to use when measuring line width
line width measuring strategy
▸ Static setMeasureLineStrategy(strategy): void
Sets the strategy to use when measuring line width This function sets the 'getLineWidth' function according to the strategy
| Name | Type |
|---|---|
strategy | LineMetricsStrategy |
void