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

io.github.humbleui.skija.shaper.HbIcuScriptRunIterator Maven / Gradle / Ivy

There is a newer version: 0.116.2
Show newest version
package io.github.humbleui.skija.shaper;

import java.lang.ref.*;
import org.jetbrains.annotations.*;
import io.github.humbleui.skija.*;
import io.github.humbleui.skija.impl.*;

public class HbIcuScriptRunIterator extends ManagedRunIterator {
    static { Library.staticLoad(); }

    public HbIcuScriptRunIterator(ManagedString text, boolean manageText) {
        super(_nMake(Native.getPtr(text)), text, manageText);
        Stats.onNativeCall();
        Reference.reachabilityFence(text);
    }

    public HbIcuScriptRunIterator(String text) {
        this(new ManagedString(text), true);
    }

    @Override
    public ScriptRun next() {
        try {
            _nConsume(_ptr);
            return new ScriptRun(_getEndOfCurrentRun(), _nGetCurrentScriptTag(_ptr));
        } finally {
            Reference.reachabilityFence(this);
        }
    }

    @ApiStatus.Internal public static native long _nMake(long textPtr);
    @ApiStatus.Internal public static native int _nGetCurrentScriptTag(long ptr);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy