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

io.github.parubok.text.multiline.MultilineUtils Maven / Gradle / Ivy

There is a newer version: 1.20
Show newest version
package io.github.parubok.text.multiline;

import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Insets;

class MultilineUtils {
    private MultilineUtils() {
    }

    static Dimension toDimension(int width, int height, Insets insets) {
        return new Dimension(width + insets.right + insets.left, height + insets.top + insets.bottom);
    }

    static int getHeightIncrement(FontMetrics fm, float lineSpacing) {
        return Math.round(fm.getHeight() * lineSpacing);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy