Companion

object Companion

Properties

Link copied to clipboard
Link copied to clipboard
const val SHARE_OF_ZOOM_FACTOR: Float = 0.15f

Functions

Link copied to clipboard
fun calcCenterOfMass(points: Array<Point2D>): Point2D

Returns a Point2D object that represents the center of mass of the given point array which represents a polygon.

Link copied to clipboard
fun findEnclosedRectangle(shape: Shape, y: Int, height: Int): Rectangle
Link copied to clipboard
fun getArea(shape: Shape?): Double
Link copied to clipboard
fun getCentroid(shape: Shape): Point2D

Returns a Point2D object that represents the center of mass of the given shape.

Link copied to clipboard
fun getPoints(shape: Shape): Array<Point2D>