API / geotoolkit / gauges / layout / Region / Region
Implements a region which is the main component in the process of layouting the gauge elements. A region is an abstract rectangle which defines some area withing the gauge bounds and can contain any part of the gauge. By default, gauge is divided into 9 regions, but not limited to that. Custom regions can be added. Since regions are an abstract object, no fill style and/or linestyle can be applied to them. Bounds of a region are calculated and set by the gauge, thus, setting bounds from an application will be overridden.
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
bounds | Rect | The region bounds |
bounds-height | number | Height |
bounds-readonly | boolean | Readonly |
bounds-width | number | Width |
bounds-x | number | Left |
bounds-y | number | Top |
fillstyle | string | The region fill style |
fillstyle | FillStyle | The region fill style |
fillstyle-color | string | Color in CSS form |
fillstyle-evenoddmode | boolean | Even-odd fill mode |
fillstyle-fillpattern | Pattern | Pattern |
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 |
fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
fillstyle-foreground | string | Foreground color |
fillstyle-pattern | Pattern | Pattern |
height | number | string | Height of the region |
linestyle | string | The region line style |
linestyle | LineStyle | The region line style |
linestyle-color | string | Color in CSS form |
linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
linestyle-linecap | CapStyle | The line cap style |
linestyle-linedashoffset | number | Line dash offset of dashed line |
linestyle-linejoin | JoinStyle | The line join style |
linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
linestyle-scalable | boolean | True if width should depend on transformation |
linestyle-unit | string | Optional unit for the width |
linestyle-width | number | string | The line thickness |
name | string | The region name |
parent | Regions | The region relative to which this region is calculated |
width | number | string | Width of the region |
x | number | string | X coordinate of the region |
y | number | string | Y coordinate of the region |
Methods
▸ clone(): Region
Get a clone of this object
clone
▸ getBounds(): Rect
Returns bounds of the region
▸ getClassName(): string
string
▸ getFillStyle(): FillStyle
Gets Fill Style of this region
▸ getHeight(): number
Returns Height property of region
number
▸ getLineStyle(): LineStyle
Gets Line Style of this region
▸ getParent(): string
Gets the parent where this region is rendered
string
▸ getProperties(): Required<Omit<Options, "width" | "height" | "x" | "y">>
Gets properties pertaining to this object
Required<Omit<Options, "width" | "height" | "x" | "y">>
properties
▸ getWidth(): number
Returns Width property of region
number
▸ setBounds(bounds): Region
Sets bounds for this region
| Name | Type | Description |
|---|---|---|
bounds | Rect | New bounds |
▸ setFillStyle(fillStyle, merge?): Region
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
▸ setHeight(h): Region
Sets Height property of region
| Name | Type | Description |
|---|---|---|
h | number | New Height to set |
▸ setLineStyle(lineStyle, merge?): Region
Sets line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setParent(parent): Region
Sets the name of region relative to which this region is calculated
| Name | Type | Description |
|---|---|---|
parent | string | region parent |
▸ setProperties(params?): Region
Sets properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional params | Options | properties |
▸ setWidth(w): Region
Sets Width property of region
| Name | Type | Description |
|---|---|---|
w | number | New Width to set |
▸ setX(x): Region
Sets X property of region
| Name | Type | Description |
|---|---|---|
x | number | New X to set |
▸ setY(y): Region
Sets Y property of region
| Name | Type | Description |
|---|---|---|
y | number | New Y to set |
▸ Static fromObject(region): Region
Create or get a region from an object
region
▸ Static getClassName(): string
string