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

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

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

import java.util.*;
import org.jetbrains.annotations.*;
import io.github.humbleui.skija.*;

public class TrivialFontRunIterator implements Iterator {
    @ApiStatus.Internal public final int     _length;
    @ApiStatus.Internal public final Font    _font;
    @ApiStatus.Internal public       boolean _atEnd;
    
    public TrivialFontRunIterator(String text, Font font) {
        _length = text.length();
        _font   = font;
        _atEnd  = _length == 0;
    }

    @Override
    public FontRun next() {
        _atEnd = true;
        return new FontRun(_length, _font);
    }

    @Override
    public boolean hasNext() {
        return !_atEnd;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy