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

commonMain.com.bselzer.ktx.serialization.serializer.QuadrilateralSerializer.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.Quadrilateral
import com.bselzer.ktx.geometry.dimension.bi.position.Point2D

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy