Style

Style class.

Constructor

new Style()

Methods

applyZoomScale(value) → {Scalar2D}

Apply zoom scale on an input value.

Parameters:
NameTypeDescription
valuenumber

The value to scale.

Returns:

The scaled value as {x,y}.

Type: 
Scalar2D

getBaseScale() → {Scalar2D}

Get the base scale.

Returns:

The scale as {x,y}.

Type: 
Scalar2D

getFontFamily() → {string}

Get the font family.

Returns:

The font family.

Type: 
string

getFontSize() → {number}

Get the font size.

Returns:

The font size.

Type: 
number

getFontStr() → {string}

Get the font definition string.

Returns:

The font definition string.

Type: 
string

getLineColour() → {string}

Get the line colour.

Returns:

The line colour.

Type: 
string

getLineHeight() → {number}

Get the line height.

Returns:

The line height.

Type: 
number

getScaledFontSize() → {number}

Get the font size scaled to the display.

Returns:

The scaled font size.

Type: 
number

getScaledStrokeWidth() → {number}

Get the stroke width scaled to the display.

Returns:

The scaled stroke width.

Type: 
number

getShadowLineColour() → {string}

Get the shadow line colour.

Returns:

The shadow line colour.

Type: 
string

getShadowOffset() → {Scalar2D}

Get the shadow offset.

Returns:

The offset as {x,y}.

Type: 
Scalar2D

getStrokeWidth() → {number}

Get the stroke width.

Returns:

The stroke width.

Type: 
number

getTagOpacity() → {number}

Get the tag opacity.

Returns:

The opacity.

Type: 
number

getTextColour() → {string}

Get the text colour.

Returns:

The text colour.

Type: 
string

getTextPadding() → {number}

Get the text padding.

Returns:

The padding.

Type: 
number

getZoomScale() → {Scalar2D}

Get the zoom scale.

Returns:

The scale as {x,y}.

Type: 
Scalar2D

scale(value) → {number}

Scale an input value using the base scale.

Parameters:
NameTypeDescription
valuenumber

The value to scale.

Returns:

The scaled value.

Type: 
number

setBaseScale(scale)

Set the base scale.

Parameters:
NameTypeDescription
scaleScalar2D

The scale as {x,y}.

setLineColour(colour)

Set the line colour.

Parameters:
NameTypeDescription
colourstring

The line colour.

setZoomScale(scale)

Set the zoom scale.

Parameters:
NameTypeDescription
scaleScalar2D

The scale as {x,y}.