API / geotoolkit / contour / visuals / VisualColorMap / VisualColorMap
visuals.VisualColorMap.VisualColorMap
This class stores the colorMap table for the Visuals (AbstractVisual and its derivatives).
Constructors
| [new VisualColorMap(visual)](/solutions/geotoolkit/apis/classes/geotoolkit.contour.visuals.visualcolormap.visualcolormap.md#new visualcolormap(visual)) | [new VisualColorMap(visual, colors)](/solutions/geotoolkit/apis/classes/geotoolkit.contour.visuals.visualcolormap.visualcolormap.md#new visualcolormap(visual, colors)) |
|---|
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
visual | AbstractVisual | The associated visual |
visual-clipstyle | ClipStyle | Clipping style |
visual-clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
visual-clipstyle-geometry | GraphicsPath | Clipping geometry |
visual-clipstyle-geometry-bounds | Rect | Bounds |
visual-clipstyle-geometry-bounds-height | number | Height |
visual-clipstyle-geometry-bounds-readonly | boolean | Readonly |
visual-clipstyle-geometry-bounds-width | number | Width |
visual-clipstyle-geometry-bounds-x | number | Left |
visual-clipstyle-geometry-bounds-y | number | Top |
visual-clipstyle | GraphicsPath | Clipping style |
visual-colorbehavior | BehaviorType | Color behavior type |
visual-colormap | VisualColorMap | Colormap properties |
visual-cssclass | string | The css class name of this node |
visual-csscursor | string | CSS cursor associated with node |
visual-cssstyle | string | CSS style to be applied to inserted elements |
visual-fillstyle | string | Style applied on fill |
visual-fillstyle | FillStyle | Style applied on fill |
visual-fillstyle-color | string | Color in CSS form |
visual-fillstyle-evenoddmode | boolean | Even-odd fill mode |
visual-fillstyle-fillpattern | Pattern | Pattern |
visual-fillstyle-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 |
visual-fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
visual-fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
visual-fillstyle-foreground | string | Foreground color |
visual-fillstyle-pattern | Pattern | Pattern |
visual-id | string | number | Id of the node, its a unique identifier |
visual-linestyle | string | Style applied on outline |
visual-linestyle | LineStyle | Style applied on outline |
visual-linestyle-color | string | Color in CSS form |
visual-linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
visual-linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
visual-linestyle-linecap | CapStyle | The line cap style |
visual-linestyle-linedashoffset | number | Line dash offset of dashed line |
visual-linestyle-linejoin | JoinStyle | The line join style |
visual-linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
visual-linestyle-scalable | boolean | True if width should depend on transformation |
visual-linestyle-unit | string | Optional unit for the width |
visual-linestyle-width | number | string | The line thickness |
visual-localtransform | Transformation | Local transformation |
visual-localtransform-dx | number | X axis translation |
visual-localtransform-dy | number | Y axis translation |
visual-localtransform-xx | number | X scale |
visual-localtransform-xy | number | Xy skew |
visual-localtransform-yx | number | Yx skew |
visual-localtransform-yy | number | Y scale |
visual-margins | number | string | It has properties for specifying the margins for each side |
visual-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
visual-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
visual-opacityblendmode | BlendMode | Node opacity mode to blend it |
visual-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
visual-scalescrollstrategy-enabled | boolean | Enable flag |
visual-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
visual-tag | any | Custom 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 |
visual-transform | string | Additional CSS transformation applied to node or 'none' |
visual-transform | Transformation | Additional CSS transformation applied to node or 'none' |
visual-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
visual-z-index | number | Define node z-index |
Constructors
• new VisualColorMap(visual?)
| Name | Type |
|---|---|
Optional visual | Options |
• new VisualColorMap(visual?, colors?)
| Name | Type | Description |
|---|---|---|
Optional visual | AbstractVisual | The associated visual |
Optional colors | VisualColorMap | the colorMap |
Methods
▸ clone(): VisualColorMap
Make and return a deep copy of this colorMap
clone The cloned colorMap.
▸ deleteColors(start, end): void
Delete the colors in the range nStart->nEnd inclusive. Not used by any of the Visuals classes - only used by the Editor classes.
| Name | Type | Description |
|---|---|---|
start | number | Start of range to delete |
end | number | End of range to delete |
void
▸ getClassName(): string
string
▸ getColorFor(index): string
Returns the Color for the supplied index.
| Name | Type | Description |
|---|---|---|
index | number | Index for the requested color. |
string
color The requested color for this index.
▸ getColors(): string[]
Gets the colorMap as an array of color strings.
string[]
colors The colorMap colors in string format.
▸ getProperties(): Options
Gets the colorMap properties
colorMap properties
▸ getSize(): number
Gets the size of the colorMap.
number
size The size of the colorMap.
▸ insertColor(nStart): void
Insert a new color into the colorMap. Not used by any of the Visuals classes - only used by the Editor classes. Set nStart to Size to insert at the end of the colorMap
| Name | Type | Description |
|---|---|---|
nStart | number | Index to insert new color at. The color at this index will be copied. |
void
▸ interpolate(nStart, nEnd): void
Interpolate colors in the colorMap. Not used by any of the Visuals classes - only used by the Editor classes.
| Name | Type | Description |
|---|---|---|
nStart | number | Start of range to interpolate (this color stays the same) |
nEnd | number | End of range to delete (this color stays the same) |
void
▸ rotate(nStart, nEnd, delta): void
Rotates colors in the colorMap, in a positive direction. Ie. index 0 -> index (delta). Can also handle negative delta values
| Name | Type | Description |
|---|---|---|
nStart | number | Start of range to rotate. |
nEnd | number | End (inclusive) of range to rotate. |
delta | number | The rotation value. |
void
▸ setColorFor(index, color): VisualColorMap
Sets the Color object for the supplied colorMap index. This is required for the Editor dialog boxes, and is not used by any of the visuals to modify a supplied colorMap.
| Name | Type | Description |
|---|---|---|
index | number | Index into the colorMap. |
color | string | The new color for this index. |
this
▸ setColors(colors): VisualColorMap
Sets the colorMap colors.
| Name | Type | Description |
|---|---|---|
colors | string[] | The colorMap colors in string format. |
this
▸ setProperties(props?): VisualColorMap
Sets the colorMap properties
| Name | Type | Description |
|---|---|---|
Optional props | Options | colorMap properties |
this
▸ Static getClassName(): string
string