API / geotoolkit / welllog / attributes / LogGradientStyle / 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.
↳
LogGradientStyle
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
color | string | Color in CSS form |
colorprovider | string | Color provider |
colorprovider | ColorProvider | Color provider |
colorprovider-max | number | |
colorprovider-min | number | |
colorprovider-scale | KnownScales | |
colorrange | Range | Color range (min and max value) |
colorrange-high | number | Upper range boundary |
colorrange-low | number | Lower range boundary |
colorrange-max | number | |
colorrange-min | number | |
datasource | string | Log data id |
evenoddmode | boolean | Even-odd fill mode |
fillpattern | Pattern | Pattern |
fillpattern-containername | string | An 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-patternname | string | Name of this pattern for indexing |
fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
foreground | string | Foreground color |
normalize | boolean | Normalize data value to color space, default true |
pattern | Pattern | Pattern |
renderbackground | boolean | Extra style parameter for background fill |
renderforeground | boolean | Extra style parameter for foreground fill. Normally to render patterns |
transparency | number | Value for alpha chanel |
Constructors
• new LogGradientStyle(color?, pattern?, foregroundcolor?, normalize?)
Create LogGradientStyle
| Name | Type | Description |
|---|---|---|
Optional color | string | RgbaColor | HsvColor | FillStyle | Options | Rgba Color or properties object |
Optional pattern | Pattern | fill pattern |
Optional foregroundcolor | string | RgbaColor | Rgba Color |
Optional normalize | boolean |
LogDataStyle.constructor
Accessors
• Static get Empty(): FillStyle
Empty style
LogDataStyle.Empty
• Static get Pick(): FillStyle
Pick style
LogDataStyle.Pick
Methods
▸ clone(): FillStyle
All inheritors should implement copy constructor or provide custom implementation for this method
this
▸ Protected copyConstructor(src): LogGradientStyle
copy constructor
| Name | Type | Description |
|---|---|---|
src | LogGradientStyle | Source to copy from |
▸ dispose(): void
Dispose.
void
▸ equalsTo(other): boolean
Returns true if fills are identical
| Name | Type | Description |
|---|---|---|
other | FillStyle | FillStyle to compare against |
boolean
▸ getClassName(): string
string
▸ getColor(): string
Returns color
string
color in CSS form
▸ getColorProvider(): ColorProvider
return color provider
color provider the color provider
▸ getColorRange(): Range
returns color range (min and max value)
▸ getEvenOddMode(): boolean
Gets the even odd fill mode
boolean
evenOddMode The even odd fill mode flag.
▸ getForegroundColor(): string
Gets foreground color
string
color in CSS form
LogDataStyle.getForegroundColor
▸ getInterpolationType(): InterpolationType
Returns interpolation type
LogDataStyle.getInterpolationType
▸ getLogData(): LogAbstractData
return log data
log data
▸ getLogDataId(): string
return log data id
string
▸ getNormalize(): boolean
return normalization flag, if true data values will be normalized to color space
boolean
normalization flag
▸ getPattern(context?): any
Return fill pattern. Can pass in rendering context to get HTML DOM pattern, or no arguments to get fillPattern object.
| Name | Type | Description |
|---|---|---|
Optional context | IPatternContext | native rendering context |
any
image pattern
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
▸ getRaster(xMin?, yMin?, xMax?, yMax?): Raster
Returns a new instance of Raster
| Name | Type | Description |
|---|---|---|
Optional xMin | number | x Min position to get color |
Optional yMin | number | y Min position to get color |
Optional xMax | number | x Max position to get color |
Optional yMax | number | y Max position to get color |
▸ getRenderBackground(): boolean
return render background state
boolean
LogDataStyle.getRenderBackground
▸ getRenderForeground(): boolean
return render additional foreground
boolean
LogDataStyle.getRenderForeground
▸ getRgbaColor(): RgbaColor
Return RGBA color
color
▸ getShadow(): Shadow
Gets all properties pertaining to shadow
JSON with offsetX, offsetY, color and blur properties
▸ getStyleType(): string
Gets type of style this is, STYLE_TYPE_COLOR or STYLE_TYPE_PATTERN
string
styleType
▸ getTimeStamp(): number
Gets time stamp
number
timeStamp
▸ getTransparency(): number
Returns transparency
number
alpha chanel value
▸ getValueAt(depth, interpolationType): number
Return value at
| Name | Type | Description |
|---|---|---|
depth | number | depth to get value at |
interpolationType | InterpolationType | interpolation type |
number
▸ getValueColor(x, depth, y?, ratio?): RgbaColor
Gets color for specified depth and values
| Name | Type | Description |
|---|---|---|
x | number | x device coordinate |
depth | number | depth |
Optional y | number | y device coordinate |
Optional ratio | number | ratio x to total width |
rgba color
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
▸ invalidate(): LogGradientStyle
notify the node that the style is invalidated
this
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): LogGradientStyle
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | Style | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of the event |
Optional callback | (eventType: E, sender: LogGradientStyle, args: EventMap[E]) => void | function to be called |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: LogGradientStyle, args: EventMap[E]) => void | to be called |
this
▸ setColor(color): LogGradientStyle
Sets color
| Name | Type | Description |
|---|---|---|
color | string | RgbaColor | HsvColor | HlsColor | in CSS string form or RgbaColor object |
this
▸ setColorProvider(colorProvider): LogGradientStyle
set color provider
| Name | Type | Description |
|---|---|---|
colorProvider | ColorProvider | the color provider |
this
▸ 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.
| Name | Type | Description |
|---|---|---|
range | Range | color range (min and max value) |
this
▸ setEvenOddMode(evenOddMode): LogGradientStyle
Sets the even odd fill mode
| Name | Type | Description |
|---|---|---|
evenOddMode | boolean | The even odd fill mode flag. |
this
▸ setForegroundColor(color): LogGradientStyle
Sets foreground color
this
LogDataStyle.setForegroundColor
▸ setInterpolationType(interpolationType): LogGradientStyle
Sets interpolation type
Throws
If interpolationType is not correct
| Name | Type | Description |
|---|---|---|
interpolationType | string | interpolation type |
LogDataStyle.setInterpolationType
▸ setLogData(logData): LogGradientStyle
set color provider
| Name | Type | Description |
|---|---|---|
logData | LogAbstractData | log data |
this
▸ setNormalize(normalize): LogGradientStyle
set normalization flag, if true data values will be normalized to color space
| Name | Type | Description |
|---|---|---|
normalize | boolean | normalization flag |
▸ setPattern(pattern?): LogGradientStyle
Sets fill pattern.
| Name | Type | Description |
|---|---|---|
Optional pattern | Pattern | fill pattern |
this
▸ setProperties(properties?): LogGradientStyle
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
this
▸ setRenderBackground(renderBackground): LogGradientStyle
set render background state
| Name | Type | Description |
|---|---|---|
renderBackground | boolean | extra style parameter for background fill |
LogDataStyle.setRenderBackground
▸ setRenderForeground(renderForeground): LogGradientStyle
set render foreground state
| Name | Type | Description |
|---|---|---|
renderForeground | boolean | extra style parameter for foreground fill |
LogDataStyle.setRenderForeground
▸ setShadow(shadow): LogGradientStyle
Sets all properties pertaining to shadow
this
▸ setSilent(bool, force?): LogGradientStyle
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
Optional force | boolean | true if parent should be invalidated immediately |
this
▸ setTransparency(transparency): LogGradientStyle
Set transparency
| Name | Type | Description |
|---|---|---|
transparency | number | value for alpha chanel |
▸ toGrayScale(clone?): FillStyle
Clone the instance in grayscale style, or convert itself if [clone] is false.
| Name | Type | Description |
|---|---|---|
Optional clone | boolean | clone instance if true, default is true |
▸ updateTimeStamp(silent?): LogGradientStyle
Update time stamp to indicate that style has been changed.
| Name | Type | Description |
|---|---|---|
Optional silent | boolean | silent mode. If this parameter equals to true then style doesn't send invalidate event |
this
▸ Static getClassName(): string
string
▸ Static isStyleNotificationEnabled(): boolean
Return status of the global notification for all styles.
boolean