mapcomplete/Models/ThemeConfig/Json/LineRenderingConfigJson.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.8 KiB
TypeScript
Raw Normal View History

import { TagRenderingConfigJson } from "./TagRenderingConfigJson"
/**
* The LineRenderingConfig gives all details onto how to render a single line of a feature.
2021-11-07 16:34:51 +01:00
*
* This can be used if:
2021-11-07 16:34:51 +01:00
*
* - The feature is a line
* - The feature is an area
*/
export default interface LineRenderingConfigJson {
/**
* The color for way-elements and SVG-elements.
* If the value starts with "--", the style of the body element will be queried for the corresponding variable instead
*/
color?: string | TagRenderingConfigJson
/**
* The stroke-width for way-elements
*/
2021-12-21 18:35:31 +01:00
width?: string | number | TagRenderingConfigJson
/**
* A dasharray, e.g. "5 6"
* The dasharray defines 'pixels of line, pixels of gap, pixels of line, pixels of gap',
* Default value: "" (empty string == full line)
*/
dashArray?: string | TagRenderingConfigJson
2021-11-08 14:18:45 +01:00
/**
* The form at the end of a line
*/
lineCap?: "round" | "square" | "butt" | string | TagRenderingConfigJson
/**
* The color to fill a polygon with.
2023-05-19 01:37:31 +02:00
* If undefined, this will be slightly more opaque version of the stroke line.
* Use '#00000000' to make the fill invisible
2021-11-08 14:18:45 +01:00
*/
fillColor?: string | TagRenderingConfigJson
/**
2021-11-07 16:34:51 +01:00
* The number of pixels this line should be moved.
* Use a positive numbe to move to the right, a negative to move to the left (left/right as defined by the drawing direction of the line).
2021-11-07 16:34:51 +01:00
*
* IMPORTANT: MapComplete will already normalize 'key:both:property' and 'key:both' into the corresponding 'key:left' and 'key:right' tagging (same for 'sidewalk=left/right/both' which is rewritten to 'sidewalk:left' and 'sidewalk:right')
* This simplifies programming. Refer to the CalculatedTags.md-documentation for more details
*/
offset?: number | TagRenderingConfigJson
2022-03-02 00:07:33 +01:00
}