API / geotoolkit / util / GeometryUtil / GeometryUtil
util.GeometryUtil.GeometryUtil
Defines helper methods to work with geometries
Constructors
Methods
▸ getClassName(): string
string
▸ Static getBoundingBox(xx, yy): Rect
Gets bounding box for a geometry defined by arrays of x-ordinates and y-ordinates.
| Name | Type | Description |
|---|---|---|
xx | number[] | array of numbers (x-values) |
yy | number[] | array of numbers (y-values) |
▸ Static getBoundingBox(points): Rect
Gets bounding box for a geometry defined by array of points
| Name | Type | Description |
|---|---|---|
points | Point[] | array of points |
▸ Static getClassName(): string
string
▸ Static getRoundRect(bounds, radius, transformation?, path?, join?): GraphicsPath
Return rounded border path
| Name | Type | Description |
|---|---|---|
bounds | Rect | path bounds |
radius | number | RoundRectRadius | corner radius in device model space |
Optional transformation | Transformation | device transformation |
Optional path | GraphicsPath | graphics path to reuse |
Optional join | boolean | join path |
graphics path
▸ Static getVectorLength(x, y, transformation?): number
Gets device size of vector specified in model coordinates
| Name | Type | Description |
|---|---|---|
x | number | x position of vector in model coordinates |
y | number | y position of vector in model coordinates |
Optional transformation | Transformation | context transformation |
number
▸ Static getVectorLengthInModel(x, y, transformation?): number
Gets model size of vector specified in device coordinates
| Name | Type | Description |
|---|---|---|
x | number | x position of vector in device coordinates |
y | number | y position of vector in device coordinates |
Optional transformation | Transformation | context transformation |
number