Last updated

API / geotoolkit / util / GeometryUtil / GeometryUtil

Class: GeometryUtil

util.GeometryUtil.GeometryUtil

Defines helper methods to work with geometries

Table of contents

Constructors
Methods

Contents

Constructors

new GeometryUtil()

new GeometryUtil()

Methods

getClassName

getClassName(): string

Returns

string


getBoundingBox

Static getBoundingBox(xx, yy): Rect

Gets bounding box for a geometry defined by arrays of x-ordinates and y-ordinates.

Parameters

Name Type Description
xxnumber[]array of numbers (x-values)
yynumber[]array of numbers (y-values)

Returns

Rect

Static getBoundingBox(points): Rect

Gets bounding box for a geometry defined by array of points

Parameters

Name Type Description
pointsPoint[]array of points

Returns

Rect


getClassName

Static getClassName(): string

Returns

string


getRoundRect

Static getRoundRect(bounds, radius, transformation?, path?, join?): GraphicsPath

Return rounded border path

Parameters

Name Type Description
boundsRectpath bounds
radiusnumber | RoundRectRadiuscorner radius in device model space
Optional transformationTransformationdevice transformation
Optional pathGraphicsPathgraphics path to reuse
Optional joinbooleanjoin path

Returns

GraphicsPath

graphics path


getVectorLength

Static getVectorLength(x, y, transformation?): number

Gets device size of vector specified in model coordinates

Parameters

Name Type Description
xnumberx position of vector in model coordinates
ynumbery position of vector in model coordinates
Optional transformationTransformationcontext transformation

Returns

number


getVectorLengthInModel

Static getVectorLengthInModel(x, y, transformation?): number

Gets model size of vector specified in device coordinates

Parameters

Name Type Description
xnumberx position of vector in device coordinates
ynumbery position of vector in device coordinates
Optional transformationTransformationcontext transformation

Returns

number