Last updated

API / geotoolkit / welllog / attributes / LogGradientStyle / LogGradientStyle

Class: LogGradientStyle

attributes.LogGradientStyle.LogGradientStyle

Defines log gradient fill style. This fillstyle can have a color and a pattern plus data source that can be used to gradient colors. If you need to set the gradient color based on the " Normalization Limits " please refer to setColorRange() method.

Hierarchy

Table of contents

Constructors
Accessors
Methods
Css Properties
Name Type Description
colorstringColor in CSS form
colorproviderstringColor provider
colorproviderColorProviderColor provider
colorprovider-maxnumber
colorprovider-minnumber
colorprovider-scaleKnownScales
colorrangeRangeColor range (min and max value)
colorrange-highnumberUpper range boundary
colorrange-lownumberLower range boundary
colorrange-maxnumber
colorrange-minnumber
datasourcestringLog data id
evenoddmodebooleanEven-odd fill mode
fillpatternPatternPattern
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
fillpattern-patternnamestringName of this pattern for indexing
fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
foregroundstringForeground color
normalizebooleanNormalize data value to color space, default true
patternPatternPattern
renderbackgroundbooleanExtra style parameter for background fill
renderforegroundbooleanExtra style parameter for foreground fill. Normally to render patterns
transparencynumberValue for alpha chanel

Contents

Constructors

new LogGradientStyle(color, pattern, foregroundcolor, normalize)

new LogGradientStyle(color?, pattern?, foregroundcolor?, normalize?)

Create LogGradientStyle

Parameters

Name Type Description
Optional colorstring | RgbaColor | HsvColor | FillStyle | OptionsRgba Color or properties object
Optional patternPatternfill pattern
Optional foregroundcolorstring | RgbaColorRgba Color
Optional normalizeboolean

Overrides

LogDataStyle.constructor

Accessors

Empty

Static get Empty(): FillStyle

Empty style

Returns

FillStyle

Inherited from

LogDataStyle.Empty


Pick

Static get Pick(): FillStyle

Pick style

Returns

FillStyle

Inherited from

LogDataStyle.Pick

Methods

clone

clone(): FillStyle

All inheritors should implement copy constructor or provide custom implementation for this method

Returns

FillStyle

this

Inherited from

LogDataStyle.clone


copyConstructor

Protected copyConstructor(src): LogGradientStyle

copy constructor

Parameters

Name Type Description
srcLogGradientStyleSource to copy from

Returns

LogGradientStyle

Overrides

LogDataStyle.copyConstructor


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

LogDataStyle.dispose


equalsTo

equalsTo(other): boolean

Returns true if fills are identical

Parameters

Name Type Description
otherFillStyleFillStyle to compare against

Returns

boolean

Inherited from

LogDataStyle.equalsTo


getClassName

getClassName(): string

Returns

string

Inherited from

LogDataStyle.getClassName


getColor

getColor(): string

Returns color

Returns

string

color in CSS form

Inherited from

LogDataStyle.getColor


getColorProvider

getColorProvider(): ColorProvider

return color provider

Returns

ColorProvider

color provider the color provider


getColorRange

getColorRange(): Range

returns color range (min and max value)

Returns

Range


getEvenOddMode

getEvenOddMode(): boolean

Gets the even odd fill mode

Returns

boolean

evenOddMode The even odd fill mode flag.

Inherited from

LogDataStyle.getEvenOddMode


getForegroundColor

getForegroundColor(): string

Gets foreground color

Returns

string

color in CSS form

Inherited from

LogDataStyle.getForegroundColor


getInterpolationType

getInterpolationType(): InterpolationType

Returns interpolation type

Returns

InterpolationType

Inherited from

LogDataStyle.getInterpolationType


getLogData

getLogData(): LogAbstractData

return log data

Returns

LogAbstractData

log data

Inherited from

LogDataStyle.getLogData


getLogDataId

getLogDataId(): string

return log data id

Returns

string

Inherited from

LogDataStyle.getLogDataId


getNormalize

getNormalize(): boolean

return normalization flag, if true data values will be normalized to color space

Returns

boolean

normalization flag


getPattern

getPattern(context?): any

Return fill pattern. Can pass in rendering context to get HTML DOM pattern, or no arguments to get fillPattern object.

Parameters

Name Type Description
Optional contextIPatternContextnative rendering context

Returns

any

image pattern

Inherited from

LogDataStyle.getPattern


getProperties

getProperties(): OptionsOut

Gets all the properties pertaining to this object

Returns

OptionsOut

Overrides

LogDataStyle.getProperties


getRaster

getRaster(xMin?, yMin?, xMax?, yMax?): Raster

Returns a new instance of Raster

Parameters

Name Type Description
Optional xMinnumberx Min position to get color
Optional yMinnumbery Min position to get color
Optional xMaxnumberx Max position to get color
Optional yMaxnumbery Max position to get color

Returns

Raster

Inherited from

LogDataStyle.getRaster


getRenderBackground

getRenderBackground(): boolean

return render background state

Returns

boolean

Inherited from

LogDataStyle.getRenderBackground


getRenderForeground

getRenderForeground(): boolean

return render additional foreground

Returns

boolean

Inherited from

LogDataStyle.getRenderForeground


getRgbaColor

getRgbaColor(): RgbaColor

Return RGBA color

Returns

RgbaColor

color

Inherited from

LogDataStyle.getRgbaColor


getShadow

getShadow(): Shadow

Gets all properties pertaining to shadow

Returns

Shadow

JSON with offsetX, offsetY, color and blur properties

Inherited from

LogDataStyle.getShadow


getStyleType

getStyleType(): string

Gets type of style this is, STYLE_TYPE_COLOR or STYLE_TYPE_PATTERN

Returns

string

styleType

Inherited from

LogDataStyle.getStyleType


getTimeStamp

getTimeStamp(): number

Gets time stamp

Returns

number

timeStamp

Inherited from

LogDataStyle.getTimeStamp


getTransparency

getTransparency(): number

Returns transparency

Returns

number

alpha chanel value


getValueAt

getValueAt(depth, interpolationType): number

Return value at

Parameters

Name Type Description
depthnumberdepth to get value at
interpolationTypeInterpolationTypeinterpolation type

Returns

number

Inherited from

LogDataStyle.getValueAt


getValueColor

getValueColor(x, depth, y?, ratio?): RgbaColor

Gets color for specified depth and values

Parameters

Name Type Description
xnumberx device coordinate
depthnumberdepth
Optional ynumbery device coordinate
Optional rationumberratio x to total width

Returns

RgbaColor

rgba color

Overrides

LogDataStyle.getValueColor


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

LogDataStyle.hasEventListener


invalidate

invalidate(): LogGradientStyle

notify the node that the style is invalidated

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.invalidate


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

LogDataStyle.isDisposed


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

LogDataStyle.isSilent


notify

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

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceStyleof the event
Optional argsEventMap[E]arguments of the event

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.notify


off

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

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
typeEtype of the event
Optional callback(eventType: E, sender: LogGradientStyle, args: EventMap[E]) => voidfunction to be called

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.off


on

on<E>(type, callback): LogGradientStyle

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: LogGradientStyle, args: EventMap[E]) => voidto be called

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.on


setColor

setColor(color): LogGradientStyle

Sets color

Parameters

Name Type Description
colorstring | RgbaColor | HsvColor | HlsColorin CSS string form or RgbaColor object

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setColor


setColorProvider

setColorProvider(colorProvider): LogGradientStyle

set color provider

Parameters

Name Type Description
colorProviderColorProviderthe color provider

Returns

LogGradientStyle

this


setColorRange

setColorRange(range): LogGradientStyle

set color range (min and max value). If you need to set the gradient color based on the " Normalization Limits " refer to the code in the example while changing normalization limits on the curve.

Parameters

Name Type Description
rangeRangecolor range (min and max value)

Returns

LogGradientStyle

this


setEvenOddMode

setEvenOddMode(evenOddMode): LogGradientStyle

Sets the even odd fill mode

Parameters

Name Type Description
evenOddModebooleanThe even odd fill mode flag.

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setEvenOddMode


setForegroundColor

setForegroundColor(color): LogGradientStyle

Sets foreground color

Parameters

Name Type Description
colorstring | RgbaColor | HsvColor | HlsColorRgbaColor for foreground

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setForegroundColor


setInterpolationType

setInterpolationType(interpolationType): LogGradientStyle

Sets interpolation type

Throws

If interpolationType is not correct

Parameters

Name Type Description
interpolationTypestringinterpolation type

Returns

LogGradientStyle

Inherited from

LogDataStyle.setInterpolationType


setLogData

setLogData(logData): LogGradientStyle

set color provider

Parameters

Name Type Description
logDataLogAbstractDatalog data

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setLogData


setNormalize

setNormalize(normalize): LogGradientStyle

set normalization flag, if true data values will be normalized to color space

Parameters

Name Type Description
normalizebooleannormalization flag

Returns

LogGradientStyle


setPattern

setPattern(pattern?): LogGradientStyle

Sets fill pattern.

Parameters

Name Type Description
Optional patternPatternfill pattern

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setPattern


setProperties

setProperties(properties?): LogGradientStyle

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsAn object containing the properties to set

Returns

LogGradientStyle

this

Overrides

LogDataStyle.setProperties


setRenderBackground

setRenderBackground(renderBackground): LogGradientStyle

set render background state

Parameters

Name Type Description
renderBackgroundbooleanextra style parameter for background fill

Returns

LogGradientStyle

Inherited from

LogDataStyle.setRenderBackground


setRenderForeground

setRenderForeground(renderForeground): LogGradientStyle

set render foreground state

Parameters

Name Type Description
renderForegroundbooleanextra style parameter for foreground fill

Returns

LogGradientStyle

Inherited from

LogDataStyle.setRenderForeground


setShadow

setShadow(shadow): LogGradientStyle

Sets all properties pertaining to shadow

Parameters

Name Type Description
shadowPartial<Merge<Shadow, { color?: string | RgbaColor }>>data

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setShadow


setSilent

setSilent(bool, force?): LogGradientStyle

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode
Optional forcebooleantrue if parent should be invalidated immediately

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.setSilent


setTransparency

setTransparency(transparency): LogGradientStyle

Set transparency

Parameters

Name Type Description
transparencynumbervalue for alpha chanel

Returns

LogGradientStyle


toGrayScale

toGrayScale(clone?): FillStyle

Clone the instance in grayscale style, or convert itself if [clone] is false.

Parameters

Name Type Description
Optional clonebooleanclone instance if true, default is true

Returns

FillStyle

Inherited from

LogDataStyle.toGrayScale


updateTimeStamp

updateTimeStamp(silent?): LogGradientStyle

Update time stamp to indicate that style has been changed.

Parameters

Name Type Description
Optional silentbooleansilent mode. If this parameter equals to true then style doesn't send invalidate event

Returns

LogGradientStyle

this

Inherited from

LogDataStyle.updateTimeStamp


getClassName

Static getClassName(): string

Returns

string

Inherited from

LogDataStyle.getClassName


isStyleNotificationEnabled

Static isStyleNotificationEnabled(): boolean

Return status of the global notification for all styles.

Returns

boolean

Inherited from

LogDataStyle.isStyleNotificationEnabled