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

commonMain.ru.casperix.multiplatform.text.TextRendererApi.kt Maven / Gradle / Ivy

The newest version!
package ru.casperix.multiplatform.text

import ru.casperix.math.vector.float32.Vector2f
import ru.casperix.multiplatform.font.FontMetrics
import ru.casperix.multiplatform.font.FontReference
import ru.casperix.multiplatform.text.impl.TextScheme
import ru.casperix.multiplatform.text.impl.TextView
import ru.casperix.renderer.misc.AlignMode
import ru.casperix.renderer.vector.VectorGraphic

interface TextRendererApi {
    fun getFontMetrics(font: FontReference): FontMetrics

    fun getTextScheme(
        blocks: List,
        availableArea: Vector2f = Vector2f(Float.POSITIVE_INFINITY),
        alignMode: AlignMode = AlignMode.LEFT_TOP,
    ): TextScheme

    fun getTextGraphic(
        scheme: TextScheme
    ): VectorGraphic

    fun getTextMetricGraphic(
        scheme: TextScheme
    ): VectorGraphic
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy