CoordinateSpace

interface CoordinateSpace<T : Any>

A context for map/scheme coordinates manipulation

Inheritors

Properties

Link copied to clipboard

A view point used by default

Functions

Link copied to clipboard
open fun T.distanceTo(b: T, zoom: Float): Dp
Link copied to clipboard
open fun T.distanceToLine(a: T, b: T, zoom: Float): Dp
Link copied to clipboard
abstract fun T.isInsidePolygon(points: List<T>): Boolean
Link copied to clipboard
abstract fun ViewPoint<T>.moveBy(delta: T): ViewPoint<T>
Link copied to clipboard
abstract fun T.offsetTo(b: T, zoom: Float): DpOffset
Link copied to clipboard
abstract fun Rectangle(first: T, second: T): Rectangle<T>

Build a rectangle by two opposing corners

abstract fun Rectangle(center: T, zoom: Float, size: DpSize): Rectangle<T>

Build a rectangle of visual size size

Link copied to clipboard
fun <T : Any> CoordinateSpace<T>.Rectangle(viewPoint: ViewPoint<T>, size: DpSize): Rectangle<T>
Link copied to clipboard
abstract fun ViewPoint(center: T, zoom: Float): ViewPoint<T>

Create a ViewPoint associated with this coordinate space.

Link copied to clipboard
abstract fun Rectangle<T>.withCenter(center: T): Rectangle<T>

Move given rectangle to be centered at center

Link copied to clipboard
abstract fun Collection<T>.wrapPoints(): Rectangle<T>?
Link copied to clipboard
Link copied to clipboard
abstract fun ViewPoint<T>.zoomBy(zoomDelta: Float, invariant: T = focus): ViewPoint<T>