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

commonMain.io.nacular.doodle.drawing.TextFactory.kt Maven / Gradle / Ivy

There is a newer version: 0.10.2
Show newest version
package io.nacular.doodle.drawing

import io.nacular.doodle.dom.HTMLElement
import io.nacular.doodle.text.StyledText
import io.nacular.doodle.text.TextSpacing
import io.nacular.doodle.utils.TextAlignment

/**
 * Created by Nicholas Eddy on 10/30/17.
 */

internal interface TextFactory {
    fun create (text: String,     font: Font? = null,                                                                                    textSpacing: TextSpacing, possible: HTMLElement? = null): HTMLElement
    fun create (text: StyledText,                                                                                                        textSpacing: TextSpacing, possible: HTMLElement? = null): HTMLElement
    fun wrapped(text: String,     font: Font? = null, width: Double, indent: Double = 0.0, alignment: TextAlignment, lineSpacing: Float, textSpacing: TextSpacing, possible: HTMLElement? = null): HTMLElement
    fun wrapped(text: String,     font: Font? = null,                indent: Double = 0.0, alignment: TextAlignment, lineSpacing: Float, textSpacing: TextSpacing, possible: HTMLElement? = null): HTMLElement
    fun wrapped(text: StyledText,                     width: Double, indent: Double = 0.0, alignment: TextAlignment, lineSpacing: Float, textSpacing: TextSpacing, possible: HTMLElement? = null): HTMLElement
    fun wrapped(text: StyledText,                                    indent: Double = 0.0, alignment: TextAlignment, lineSpacing: Float, textSpacing: TextSpacing, possible: HTMLElement? = null): HTMLElement
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy