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

com.blitline.image.functions.AbstractTextFunction Maven / Gradle / Ivy

There is a newer version: 0.17.1
Show newest version
package com.blitline.image.functions;

import org.apache.commons.lang3.Validate;

import com.blitline.image.functions.params.Gravity;

public abstract class AbstractTextFunction> extends AbstractFunction {

	private static final long serialVersionUID = 1L;

	protected AbstractTextFunction(String text) {
		params.put("text", text);
	}

	protected abstract T getThis();

	public T gravity(Gravity gravity) {
		params.put("gravity", gravity);
		return getThis();
	}

	public T pointSize(int pointSize) {
		Validate.isTrue(pointSize > 0, "text size in points must be positive");

		params.put("point_size", pointSize);
		return getThis();
	}

	public T fontFamily(String fontFamily){
		params.put("font_family", fontFamily);
		return getThis();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy