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

jvmMain.org.jetbrains.skia.shaper.JavaTextBidiRunIterator.kt Maven / Gradle / Ivy

There is a newer version: 0.6.7
Show newest version
package org.jetbrains.skia.shaper

import java.text.Bidi

class JavaTextBidiRunIterator @JvmOverloads constructor(
    text: String?,
    flags: Int = Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT
) : MutableIterator {
    internal val _bidi: Bidi

    internal val _runsCount: Int

    internal var _run: Int
    override fun next(): BidiRun {
        _run++
        return BidiRun(_bidi.getRunLimit(_run), _bidi.getRunLevel(_run))
    }

    override fun hasNext(): Boolean {
        return _run + 1 < _runsCount
    }

    init {
        _bidi = Bidi(text, flags)
        _runsCount = _bidi.runCount
        _run = -1
    }

    override fun remove() {
        TODO("Not yet implemented")
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy