Last updated

API / geotoolkit / contour / visuals / ContourLineVisual / ContourLineVisual

Class: ContourLineVisual

visuals.ContourLineVisual.ContourLineVisual

The Line Visual. This renders the isolines and their labels.

Hierarchy

Table of contents

Constructors
Methods
addCssClassaddInvalidateHandleraddVisualListener
applyOpacityapplyResponsiveStylecheckCollision
chooseColorcloneconnectStyle
contourInvalidatedcopyConstructordisconnectStyle
disposeenableEventPropagationexecute
filtergetAnimationStylegetClassName
getClipStylegetColorBehaviorgetColorMap
getCssgetCssClassgetCssClasses
getCssTransformgetFillStylegetId
getIndexStepgetInvalidateMethodgetIsolinesStylingStrategy
getLabelFormatgetLabelMargingetLabelSpacing
getLabelingStrategygetLabelsVisiblegetLineReservationFor
getLineStylegetLinesVisiblegetLocalTransform
getMarginsStylegetNamegetNotify
getOpacitygetOpacityBlendModegetParent
getPropertiesgetPropertygetPropertyKeys
getRenderingFiltergetResponsiveStylegetRoot
getScaleScrollStrategygetSceneTransformgetTag
getTextStylegetUseFontColorForLabelsgetVisible
getWorldTransformgetZIndexhasCssClass
hasEventListenerinvalidateinvalidateParent
invalidateVisualisDisposedisEventPropagationEnabled
isNotificationEnabledisSelectableisSilent
notifynotifyListenersoff
ononContourShapeSetonParentChanged
onVisibilityChangedpostRenderingpreRendering
registerAnimationStyleremoveCssClassremoveInvalidateHandler
removeVisualListenerrenderrenderAsync
resetLabelGridMappingrotatescale
setAnimationStylesetClipStylesetColorBehavior
setColorMapsetCsssetCssClass
setCssTransformsetFillStylesetId
setIndexStepsetIsolinesStylingStrategysetLabelFormat
setLabelMarginsetLabelSpacingsetLabelingStrategy
setLabelsVisiblesetLineReservationsetLineStyle
setLinesVisiblesetLocalTransformsetMarginsStyle
setNamesetNotificationsetNotify
setOpacitysetPropertiessetProperty
setRenderingFiltersetResponsiveStylesetScaleScrollStrategy
setSelectablesetSilentsetTag
setTextStylesetUseFontColorForLabelssetVisible
setZIndexsheartoString
translateunregisterAnimationStyleupdateSceneTransformation
updateStateupdateTimeStampenableSceneGraphNotification
findParentgetClassNameintersectsBounds
isSceneGraphNotificationEnabled
Css Properties
Name Type Description
clipstyleClipStyleClipping style
clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
clipstyle-geometryGraphicsPathClipping geometry
clipstyle-geometry-boundsRectBounds
clipstyle-geometry-bounds-heightnumberHeight
clipstyle-geometry-bounds-readonlybooleanReadonly
clipstyle-geometry-bounds-widthnumberWidth
clipstyle-geometry-bounds-xnumberLeft
clipstyle-geometry-bounds-ynumberTop
clipstyleGraphicsPathClipping style
colorbehaviorBehaviorTypeColor behavior type
colormapVisualColorMapColormap properties
colormap-visualAbstractVisualThe associated visual
colormap-visual-clipstyleClipStyleClipping style
colormap-visual-clipstyleGraphicsPathClipping style
colormap-visual-colorbehaviorBehaviorTypeColor behavior type
colormap-visual-colormapVisualColorMapColormap properties
colormap-visual-cssclassstringThe css class name of this node
colormap-visual-csscursorstringCSS cursor associated with node
colormap-visual-cssstylestringCSS style to be applied to inserted elements
colormap-visual-fillstylestringStyle applied on fill
colormap-visual-fillstyleFillStyleStyle applied on fill
colormap-visual-fillstyle-colorstringColor in CSS form
colormap-visual-fillstyle-evenoddmodebooleanEven-odd fill mode
colormap-visual-fillstyle-fillpatternPatternPattern
colormap-visual-fillstyle-fillpattern-containernamestringAn optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself
colormap-visual-fillstyle-fillpattern-patternnamestringName of this pattern for indexing
colormap-visual-fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
colormap-visual-fillstyle-foregroundstringForeground color
colormap-visual-fillstyle-patternPatternPattern
colormap-visual-idstring | numberId of the node, its a unique identifier
colormap-visual-linestylestringStyle applied on outline
colormap-visual-linestyleLineStyleStyle applied on outline
colormap-visual-linestyle-colorstringColor in CSS form
colormap-visual-linestyle-fillstringOptional fill style to be used to fill lines generated with this style
colormap-visual-linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
colormap-visual-linestyle-linecapCapStyleThe line cap style
colormap-visual-linestyle-linedashoffsetnumberLine dash offset of dashed line
colormap-visual-linestyle-linejoinJoinStyleThe line join style
colormap-visual-linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
colormap-visual-linestyle-scalablebooleanTrue if width should depend on transformation
colormap-visual-linestyle-unitstringOptional unit for the width
colormap-visual-linestyle-widthnumber | stringThe line thickness
colormap-visual-localtransformTransformationLocal transformation
colormap-visual-localtransform-dxnumberX axis translation
colormap-visual-localtransform-dynumberY axis translation
colormap-visual-localtransform-xxnumberX scale
colormap-visual-localtransform-xynumberXy skew
colormap-visual-localtransform-yxnumberYx skew
colormap-visual-localtransform-yynumberY scale
colormap-visual-marginsnumber | stringIt has properties for specifying the margins for each side
colormap-visual-namestringName of the node. It is often used for debugging purposes or to simplify queries
colormap-visual-opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
colormap-visual-opacityblendmodeBlendModeNode opacity mode to blend it
colormap-visual-scalescrollstrategyScaleScrollStrategyScale scroll strategy
colormap-visual-scalescrollstrategy-enabledbooleanEnable flag
colormap-visual-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
colormap-visual-taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
colormap-visual-transformstringAdditional CSS transformation applied to node or 'none'
colormap-visual-transformTransformationAdditional CSS transformation applied to node or 'none'
colormap-visual-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
colormap-visual-z-indexnumberDefine node z-index
cssclassstringThe css class name of this node
csscursorstringCSS cursor associated with node
cssstylestringCSS style to be applied to inserted elements
fillstylestringStyle applied on fill
fillstyleFillStyleStyle applied on fill
idstring | numberId of the node, its a unique identifier
indexstepnumberIndex step for line visual
labelformatNumberFormatLabel format
labelformat-fulllocalebooleanSpecify format how to provide locale
labelformat-grouplengthnumberSpecify group length of numbers
labelformat-localestringFormat locale
labelformat-localeLocaleFormat locale
labelformat-locale-localestringThe name of the locale
labelformat-locale-numberformatNumberFormatInfoDefines number format
labelformat-locale-numberformat-decstringDefines decimal symbol
labelformat-locale-numberformat-groupstringDefines group symbol
labelformat-locale-numberformat-infinitystringDefines infinity text
labelformat-locale-numberformat-negstringDefines negative symbol
labelformat-maximumfractiondigitsnumberSpecify maximum fraction digits
labelformat-minimumfractiondigitsnumberSpecify minimum fraction digits, have to be less or equal to maximumfractiondigits
labelformat-roundbooleanRound number
labelingstrategyAbstractContourLabelingStrategyLabeling strategy
labelingstrategy-labelformatNumberFormatLabel format
labelingstrategy-labelmarginnumberThe label margin for specified level
labelingstrategy-labelspacingnumberThe label spacing for specified level
labelingstrategy-textstyleTextStyleThe text style for specified level
labelingstrategy-textstyle-alignmentAlignmentStyleAlignment
labelingstrategy-textstyle-autosizebooleanAuto font size on high definition display
labelingstrategy-textstyle-backgroundstringBackground style
labelingstrategy-textstyle-backgroundFillStyleBackground style
labelingstrategy-textstyle-baselineBaseLineStyleBase line
labelingstrategy-textstyle-colorstringColor in CSS form
labelingstrategy-textstyle-fillFillStyleText fill style
labelingstrategy-textstyle-fontstringFont see
labelingstrategy-textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
labelingstrategy-textstyle-lineheightstring | numberLine height
labelingstrategy-textstyle-multilinebooleanAllow multi-line text
labelingstrategy-textstyle-outlinestringOutline style
labelingstrategy-textstyle-outlineLineStyleOutline style
labelingstrategy-textstyle-overflowwrapOverflowWrapStyleOverflow wrap
labelingstrategy-textstyle-strikethroughstringStrikethrough style
labelingstrategy-textstyle-strikethroughLineStyleStrikethrough style
labelingstrategy-textstyle-textoverflowTextOverflowStyleText overflow
labelingstrategy-textstyle-underlinestringUnderline style
labelingstrategy-textstyle-underlineLineStyleUnderline style
labelingstrategy-textstyle-underlineoffsetstring | numberUnderline offset distance
labelingstrategy-textstyle-whitespaceWhiteSpaceStyleWhite space
labelingstrategy-textstyle-wordbreakWordBreakStyleWord break
labelingstrategy-usefontcolorforlabelsbooleanFlag which indicates if font color is used for label text color
labelmarginnumberMargin around labels in device coordinates
labelspacingnumberLabel spacing between nearby labels on a isoline
labelsvisiblebooleanVisibility of labels
linestylestringStyle applied on outline
linestyleLineStyleStyle applied on outline
linestyleLineStyleStyle of line that is used to draw the isolines
linesvisiblebooleanVisibility of all isolines
localtransformTransformationLocal transformation
marginsnumber | stringIt has properties for specifying the margins for each side
namestringName of the node. It is often used for debugging purposes or to simplify queries
opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
opacityblendmodeBlendModeNode opacity mode to blend it
scalescrollstrategyScaleScrollStrategyScale scroll strategy
selectablebooleanSelectable node, a boolean to determine if selection should consider this node
taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
textstylestringText style attribute that is used to draw the labels
textstyleTextStyleText style attribute that is used to draw the labels
transformstringAdditional CSS transformation applied to node or 'none'
transformTransformationAdditional CSS transformation applied to node or 'none'
usefontcolorforlabelsbooleanFlag which indicates if font color is used for label text color
visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
z-indexnumberDefine node z-index

Contents

Constructors

new ContourLineVisual(options)

new ContourLineVisual(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

AbstractVisual.constructor

Methods

addCssClass

addCssClass(cssclass): ContourLineVisual

Adds new css class to node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.addCssClass


addInvalidateHandler

addInvalidateHandler(handler): ContourLineVisual

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.addInvalidateHandler


addVisualListener

addVisualListener(visualListener): void

Registers the specified visual listener to receiving events from this visual.

Deprecated

since 4.0

Parameters

Name Type Description
visualListenerContourShapeThe visual listener

Returns

void

Inherited from

AbstractVisual.addVisualListener


applyOpacity

Protected applyOpacity(context): ContourLineVisual

This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

AbstractVisual.applyResponsiveStyle


checkCollision

checkCollision(context): boolean

Check if this node is within the area being rendered by the context

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

true if object is inside of renderable area

Inherited from

AbstractVisual.checkCollision


chooseColor

chooseColor(index, len): string

Choose a color for the supplied contour value, using the current BehaviorType.

Parameters

Name Type Description
indexnumberThe contour index.
lennumberSize of the contour indexes. I.e. how many are there? Indexes are zero-referenced, so the highest possible index = len-1.

Returns

string

color Color with the required color for this index

Inherited from

AbstractVisual.chooseColor


clone

clone(): Node

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

Node

clone

Inherited from

AbstractVisual.clone


connectStyle

connectStyle(style, type, callback): ContourLineVisual

Connects style.

This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.connectStyle


contourInvalidated

contourInvalidated(args): void

This method is invoked when the contour shape has been invalidated. Nothing is performed for this class, but it must be overridden in subclasses for correct event processing.

Deprecated

since 4.0, use onContourShapeSet() and .on()/.off() for events

Parameters

Name Type Description
argsContourEventThe contour event

Returns

void

Inherited from

AbstractVisual.contourInvalidated


copyConstructor

Protected copyConstructor(src, deepCopy?): ContourLineVisual

Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.

Parameters

Name Type Description
srcShapeSource to copy from
Optional deepCopybooleandeep copy

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): ContourLineVisual

Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.disconnectStyle


dispose

dispose(): void

Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null.

Returns

void

Inherited from

AbstractVisual.dispose


enableEventPropagation

enableEventPropagation(enable): ContourLineVisual

Enable event propagation from the node hierarchy from bottom to top

This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.

Example

import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');

parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();

Parameters

Name Type Description
enablebooleanenable

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.enableEventPropagation


execute

execute(delegate): ContourLineVisual

Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.

Example

// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});

group.getLineStyle().setPattern('pattern');
return group;

// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});

Parameters

Name Type Description
delegate(this: ContourLineVisual) => voidFunction to execute

Returns

ContourLineVisual

The result if any or this

Inherited from

AbstractVisual.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: ContourLineVisual) => T

Returns

T

Inherited from

AbstractVisual.execute


filter

Protected filter(context): boolean

Filter node

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

flag filter flag ("true" to render node; "false" otherwise)

Inherited from

AbstractVisual.filter


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

AbstractVisual.getAnimationStyle


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractVisual.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

AbstractVisual.getClipStyle


getColorBehavior

getColorBehavior(): BehaviorType

Gets the color behavior for this visual.

Returns

BehaviorType

colorBehavior The color behavior type.

Inherited from

AbstractVisual.getColorBehavior


getColorMap

getColorMap(): VisualColorMap

Gets the visual colorMap.

Returns

VisualColorMap

colorMap The colorMap used by this visual

Inherited from

AbstractVisual.getColorMap


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

AbstractVisual.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

AbstractVisual.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

AbstractVisual.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

AbstractVisual.getCssTransform


getFillStyle

getFillStyle(): FillStyle

Return fill style

Returns

FillStyle

fillStyle current fill style

Inherited from

AbstractVisual.getFillStyle


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

AbstractVisual.getId


getIndexStep

getIndexStep(): number

Gets the index step for the line visual. Only contour lines with (index = step * i) will be displayed. Where 'i' iterates through all available line indices.

Returns

number

step Integer step interval


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

AbstractVisual.getInvalidateMethod


getIsolinesStylingStrategy

getIsolinesStylingStrategy(): IsolineStylingStrategy

Gets the isolines styling strategy

Returns

IsolineStylingStrategy


getLabelFormat

getLabelFormat(): NumberFormat

Gets label format.

Returns

NumberFormat

format


getLabelMargin

getLabelMargin(): number

Gets the label margin. The margin is specified in device coordinates. Default is 5.

Returns

number

margin The margin around labels in device coordinates.


getLabelSpacing

getLabelSpacing(): number

Gets the label spacing. This is the space between nearby labels on an isoLine. Distance is specified in device space. Default is 200.

Returns

number

spacing The label spacing.


getLabelingStrategy

getLabelingStrategy(): AbstractContourLabelingStrategy

Gets the labeling strategy.

Returns

AbstractContourLabelingStrategy

strategy The labeling strategy.


getLabelsVisible

getLabelsVisible(): boolean

Gets the visibility of all isolines

Returns

boolean

isolinesVisible True of all labels should be visible.


getLineReservationFor

getLineReservationFor(index): number

Find the line reservation value for the isoline with the specified index. This is used to determine if a particular isoline should be drawn.

Throws

if Index out of range

Parameters

Name Type Description
indexnumberIndex for which line reservation should be computed.

Returns

number

lineReservation The computed line reservation value.


getLineStyle

getLineStyle(): LineStyle

Gets the current LineStyle that is used to draw the isolines of this line visual. The "line color" property of the attribute is ignored because it is set directly from the colorMap. I.e. set such properties as "line style", and they will be applied globally to all isolines in this visual, regardless of color.

Returns

LineStyle

lineStyle The line style.

Overrides

AbstractVisual.getLineStyle


getLinesVisible

getLinesVisible(): boolean

Gets the visibility of all isolines

Returns

boolean

isolinesVisible True of all isolines should be visible.


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

AbstractVisual.getLocalTransform


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

AbstractVisual.getMarginsStyle


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

AbstractVisual.getName


getNotify

getNotify(): boolean

Gets the notification state of this visual

Deprecated

since 4.0, use .isSilent() instead

Returns

boolean

notify If this is true, updates will be broadcast to the listeners.

Inherited from

AbstractVisual.getNotify


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

AbstractVisual.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

AbstractVisual.getOpacityBlendMode


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

AbstractVisual.getParent


getProperties

getProperties(): OptionsOut

Gets all the properties pertaining to this object

Returns

OptionsOut

visual properties

Overrides

AbstractVisual.getProperties


getProperty

getProperty(name): any

Gets dynamic property by name. These properties can be used as a property bags

Parameters

Name Type Description
namestringproperty name

Returns

any

Inherited from

AbstractVisual.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

AbstractVisual.getPropertyKeys


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

AbstractVisual.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

AbstractVisual.getResponsiveStyle


getRoot

getRoot(): Node

Returns root node.
If node doesn't have parent then it returns itself.

Returns

Node

the root node

Inherited from

AbstractVisual.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

AbstractVisual.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

AbstractVisual.getSceneTransform


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

AbstractVisual.getTag


getTextStyle

getTextStyle(): TextStyle

Gets the current text style attribute that is used to draw the labels for this line visual. The "line color" property of the attribute is ignored because it is set directly from the colormap. I.e. set such properties as "font style", and they will be applied globally to all isolines in this visual, regardless of color.

Returns

TextStyle

textStyle The text style.


getUseFontColorForLabels

getUseFontColorForLabels(): boolean

Gets the flag which indicates if font color is used for label text color.

Returns

boolean

useFontColor Flag which indicates if font color is used for label text color.


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

AbstractVisual.getVisible


getWorldTransform

getWorldTransform(): Transformation

Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.

Returns

Transformation

transform the world transform.

Inherited from

AbstractVisual.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

AbstractVisual.getZIndex


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

AbstractVisual.hasCssClass


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

AbstractVisual.hasEventListener


invalidate

invalidate(bounds?, force?): ContourLineVisual

Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.

Parameters

Name Type Description
Optional boundsRectbounds of the invalid rectangle in the inner node coordinates
Optional forcebooleantrue if parent should be invalidated immediately if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.invalidate


invalidateParent

invalidateParent(bounds?, force?): ContourLineVisual

Invalidate bounds

Parameters

Name Type Description
Optional boundsRectif null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed
Optional forcebooleanflag indicating if the parent must be forcibly invalidated

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.invalidateParent


invalidateVisual

invalidateVisual(): void

Invalidates the visual, sending events

Returns

void

Inherited from

AbstractVisual.invalidateVisual


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AbstractVisual.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

AbstractVisual.isEventPropagationEnabled


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

AbstractVisual.isNotificationEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

AbstractVisual.isSelectable


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

AbstractVisual.isSilent


notify

notify<E>(type, source, args?): ContourLineVisual

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event
sourceContourLineVisualsource who called the event
Optional argsEventMap[E]event arguments

Returns

ContourLineVisual

this

Overrides

AbstractVisual.notify


notifyListeners

notifyListeners(args): void

Notifies the registered listeners of an event.

Deprecated

since 4.0

Parameters

Name Type Description
argsVisualEventThe event to pass to the listeners.

Returns

void

Inherited from

AbstractVisual.notifyListeners


off

off<E>(type?, callback?): ContourLineVisual

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: ContourLineVisual, args: EventMap[E]) => voidfunction to be called

Returns

ContourLineVisual

this

Overrides

AbstractVisual.off


on

on<E>(type, callback): ContourLineVisual

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: ContourLineVisual, args: EventMap[E]) => voidto be called

Returns

ContourLineVisual

this

Overrides

AbstractVisual.on


onContourShapeSet

Protected onContourShapeSet(contour): void

this method called when visual is connected to Contour shape. override it to subscribe and unsubscribe

Parameters

Name Type Description
contourContourShapecontour

Returns

void

Inherited from

AbstractVisual.onContourShapeSet


onParentChanged

Protected onParentChanged(node): ContourLineVisual

This method is called when parent changes. Do not call it directly.

Parameters

Name Type Description
nodeNodenode to change parent

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

This method is called if visibility is changed. Send event Events.VisibilityChanged

Returns

void

Inherited from

AbstractVisual.onVisibilityChanged


postRendering

Protected postRendering(context): void

To be called after rendering. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

AbstractVisual.postRendering


preRendering

Protected preRendering(context): void

Occurs before rendering this method sets clipping by default. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

AbstractVisual.preRendering


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AbstractVisual.registerAnimationStyle


removeCssClass

removeCssClass(cssclass): ContourLineVisual

Removes css class from node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.removeCssClass


removeInvalidateHandler

removeInvalidateHandler(handler): ContourLineVisual

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.removeInvalidateHandler


removeVisualListener

removeVisualListener(visualListener): void

Unregisters the specified visual listener from receiving event from this visual.

Deprecated

since 4.0

Parameters

Name Type Description
visualListenerContourShapeThe visual listener

Returns

void

Inherited from

AbstractVisual.removeVisualListener


render

render(renderingContext): void

Render the visual. This must be defined in all subclasses.

Parameters

Name Type Description
renderingContextRenderingContextThe rendering context.

Returns

void

Overrides

AbstractVisual.render


renderAsync

renderAsync(context, callback): void

Render node in asynchronous mode. Default implementation creates call method "render" inside

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node
callback() => voidcallback function

Returns

void

Inherited from

AbstractVisual.renderAsync


resetLabelGridMapping

resetLabelGridMapping(): void

Reset label grid mapping. The grid mapping is used for mapping triangle grid to model space.

Returns

void


rotate

rotate(theta, x, y): ContourLineVisual

Rotate bounds around a given coordinate

Parameters

Name Type Description
thetanumberangle to rotate node, in radians
xnumberx coordinate to rotate around
ynumbery coordinate to rotate around

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.rotate


scale

scale(xx, yy): ContourLineVisual

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.scale


setAnimationStyle

setAnimationStyle(animationStyle): ContourLineVisual

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

ContourLineVisual

Inherited from

AbstractVisual.setAnimationStyle


setClipStyle

setClipStyle(style): ContourLineVisual

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setClipStyle


setColorBehavior

setColorBehavior(colorBehavior): ContourLineVisual

Sets the color behavior for this visual.

Parameters

Name Type Description
colorBehaviorBehaviorTypeThe color behavior type.

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setColorBehavior


setColorMap

setColorMap(colorMap): ContourLineVisual

Sets the visual colorMap

Parameters

Name Type Description
colorMapVisualColorMapThe colorMap used by this visual

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setColorMap


setCss

setCss(style, merge?): ContourLineVisual

Sets CSS style. This style will be applied for all inserted elements

Parameters

Name Type Description
styleTypeCSS style to be applied to inserted elements
Optional mergebooleanmerge flag

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setCss


setCssClass

setCssClass(name): ContourLineVisual

Sets css class name of the node to be used to apply CSS style

Parameters

Name Type Description
namestringcss class name of the node

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setCssClass


setCssTransform

setCssTransform(transform): ContourLineVisual

Set CSS transformation

Parameters

Name Type Description
transformstring | Transformationtransformation css transformation instruction or Transformation instance

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setCssTransform


setFillStyle

setFillStyle(fillStyle, merge?): ContourLineVisual

Sets fill style

Parameters

Name Type Description
fillStyleTypea new fill style
Optional mergebooleantrue if you want to merge fillStyle with existing attribute, false by default

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setFillStyle


setId

setId(id): ContourLineVisual

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setId


setIndexStep

setIndexStep(step): ContourLineVisual

Sets the index step for the line visual. Only contour lines with (index = step * i) will be displayed. Where 'i' iterates through all available line indices.

Parameters

Name Type Description
stepnumberInteger step interval

Returns

ContourLineVisual

this


setIsolinesStylingStrategy

setIsolinesStylingStrategy(strategy): ContourLineVisual

Sets the isolines styling strategy. If set, style set in setLineStyle will be ignored. The "line color" property of the styles will override colorMap.

Parameters

Name Type Description
strategyIsolineStylingStrategystrategy

Returns

ContourLineVisual

this


setLabelFormat

setLabelFormat(format): ContourLineVisual

Sets label format.

Parameters

Name Type Description
formatNumberFormatformat

Returns

ContourLineVisual

this


setLabelMargin

setLabelMargin(margin): ContourLineVisual

Sets the label margin. The margin is specified in device coordinates. Default is 5.

Parameters

Name Type Description
marginnumberThe margin around labels in device coordinates.

Returns

ContourLineVisual

this


setLabelSpacing

setLabelSpacing(spacing): ContourLineVisual

Sets the label spacing. This is the space between nearby labels on an isoLine. Distance is specified in device space. Default is 200.

Parameters

Name Type Description
spacingnumberThe label spacing.

Returns

ContourLineVisual

this


setLabelingStrategy

setLabelingStrategy(strategy): ContourLineVisual

Sets the labeling strategy.

Parameters

Name Type Description
strategyAbstractContourLabelingStrategyThe labeling strategy.

Returns

ContourLineVisual

this


setLabelsVisible

setLabelsVisible(visible): ContourLineVisual

Sets the visibility for all isolines

Parameters

Name Type Description
visiblebooleanFlag for determining if labels should be visible.

Returns

ContourLineVisual

this


setLineReservation

setLineReservation(lineReservation): ContourLineVisual

Use this property to set the local reference to the line reservation array. This array is actually stored in the contour shape, and is passed to each line visual. All the elements of the array 'reservation[lineIndex] = Math.Max( reservation[lineIndex], GetIndexStep() )' Later, the implementation of the line visual may decide if the isoline with some particular index should be drawn using 'GetLineReservationFor' and 'GetIndexStep' methods. Hence, major and minor isolines can be supported.

Parameters

Name Type Description
lineReservationnumber[] | Int32ArrayThe line reservation

Returns

ContourLineVisual

this


setLineStyle

setLineStyle(lineStyle, merge?): ContourLineVisual

Sets the current LineStyle that is used to draw the isolines of this line visual. The "line color" property of the attribute is ignored because it is set directly from the colorMap. I.e. set such properties as "line style", and they will be applied globally to all isolines in this visual, regardless of color.

Parameters

Name Type Description
lineStyleTypeThe line style.
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

ContourLineVisual

this

Overrides

AbstractVisual.setLineStyle


setLinesVisible

setLinesVisible(visible): ContourLineVisual

Sets the visibility for all isolines

Parameters

Name Type Description
visiblebooleanFlag for determining if isolines should be visible.

Returns

ContourLineVisual

this


setLocalTransform

setLocalTransform(localTransform, force?): ContourLineVisual

Sets local transformation to be used to transform from local to parent coordinate

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node
Optional forcebooleanboolean flag to force update event if transformations are equal, false by default

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): ContourLineVisual

Sets margins style

Parameters

Name Type Description
marginsType<string | number>margins style
Optional mergebooleantrue if you want to merge marginsStyle with existing attribute, false by default

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setMarginsStyle


setName

setName(name): ContourLineVisual

Sets name of the node

Parameters

Name Type Description
namestringThe node name

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setName


setNotification

setNotification(notify, force?): ContourLineVisual

set notification state

Parameters

Name Type Description
notifybooleanflag set to invalidate parent or not
Optional forcebooleantrue if parent should be invalidated immediately

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setNotification


setNotify

setNotify(notify): void

Sets the notification state of this visual

Deprecated

since 4.0, use .setSilent() instead

Parameters

Name Type Description
notifybooleanIf this is true, updates will be broadcast to the listeners.

Returns

void

Inherited from

AbstractVisual.setNotify


setOpacity

setOpacity(opacity, blendMode?): ContourLineVisual

Sets node opacity

Parameters

Name Type Description
opacitynumbernode opacity from 0 to 1
Optional blendModeBlendModeopacity blend mode. If it is normal, opacity will be replaced.

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setOpacity


setProperties

setProperties(properties?): ContourLineVisual

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsAn object containing the properties to set

Returns

ContourLineVisual

this

Overrides

AbstractVisual.setProperties


setProperty

setProperty(name, value): ContourLineVisual

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setProperty


setRenderingFilter

setRenderingFilter(filter): ContourLineVisual

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): ContourLineVisual

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): ContourLineVisual

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setScaleScrollStrategy


setSelectable

setSelectable(selectable): ContourLineVisual

Allows to select node. If node is not selectable then child node is not selectable.

Parameters

Name Type Description
selectablebooleanflag to allow node selection

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setSelectable


setSilent

setSilent(bool): ContourLineVisual

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setSilent


setTag

setTag(tag): ContourLineVisual

Allows the user to associate any arbitrary object with the node.

Parameters

Name Type Description
taganyThe object to be associated with the node.

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setTag


setTextStyle

setTextStyle(textStyle, merge?): ContourLineVisual

Sets the current text style attributes that is used to draw the labels for this line visual.

Parameters

Name Type Description
textStyleTypeThe text style.
Optional mergebooleantrue if you want to merge textStyle with existing attribute, false by default

Returns

ContourLineVisual

this


setUseFontColorForLabels

setUseFontColorForLabels(useFontColor): ContourLineVisual

Sets the flag which indicates if font color should be used for label text color.

Parameters

Name Type Description
useFontColorbooleanFlag which indicates if font color should be used for label text color.

Returns

ContourLineVisual

this


setVisible

setVisible(value): ContourLineVisual

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setVisible


setZIndex

setZIndex(value): ContourLineVisual

Sets z-index for node (set null for default)

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.setZIndex


shear

shear(shx, shy): ContourLineVisual

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.shear


toString

toString(): string

Returns a string representation of this object (generally the classname)

Returns

string

A string representation

Inherited from

AbstractVisual.toString


translate

translate(tx, ty): ContourLineVisual

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AbstractVisual.unregisterAnimationStyle


updateSceneTransformation

updateSceneTransformation(): ContourLineVisual

Update scene transformation

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.updateSceneTransformation


updateState

updateState(regions?, changes?): ContourLineVisual

Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph

Parameters

Name Type Description
Optional regionsRect[]optional array to return invalid rectangles in the parent coordinates
Optional changesStateChangesoptional parameter to specify a reason of changes

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.updateState


updateTimeStamp

Protected updateTimeStamp(): ContourLineVisual

Update time stamp to indicate that Node or Children has been changed.

Returns

ContourLineVisual

this

Inherited from

AbstractVisual.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

AbstractVisual.enableSceneGraphNotification


findParent

Static findParent<T>(node, classType, filter?): InstanceType<T>

Find root of the node with specified type

Type parameters

NameType
Textends Constructor<any>

Parameters

Name Type Description
nodeNodenode to start search
classTypeTtype of the class to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

InstanceType<T>

Inherited from

AbstractVisual.findParent

Static findParent(node, classType, filter?): Node

Find root of the node with specified type

Parameters

Name Type Description
nodeNodenode to start search
classTypestringinterface name to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

Node

Inherited from

AbstractVisual.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractVisual.getClassName


intersectsBounds

Static intersectsBounds(bounds, localTransformation, parentInvalidArea, expand?): boolean

Check collision of the shape bounds with parent invalid area

Parameters

Name Type Description
boundsRectshape bounds
localTransformationTransformationlocal transformation of the bounds
parentInvalidAreaRectinvalid parent area
Optional expandDimensionoptional expand the bounds in model coordinate

Returns

boolean

true if bounds intersect the invalid area

Inherited from

AbstractVisual.intersectsBounds


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

AbstractVisual.isSceneGraphNotificationEnabled