All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.bselzer.ktx.serialization.serializer.DigonSerializer.kt Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
package com.bselzer.ktx.serialization.serializer

import com.bselzer.ktx.geometry.dimension.bi.polygon.Digon
import com.bselzer.ktx.geometry.dimension.bi.position.Point2D

/**
 * A serializer for converting an array into a [Digon].
 */
class DigonSerializer : PolygonSerializer() {
    override val serialName: String = Digon::class.qualifiedName!!
    override fun deserialize(points: List): Digon = Digon(points.at(0), points.at(1))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy