插件开发工具库,推荐依赖该工具库。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
919 B

package com.fanruan.api.report;
import com.fr.base.Style;
import com.fr.report.cell.cellattr.core.CellUtils;
import java.awt.*;
public class PaintKit {
/**
* 如果value是ImageWithSuffix类的一个实例,则创建一个宽为width,高为height,类型为TYPE_4BYTE_ABGR的image,并将其按照比例和Style绘制。
*
* @param value 传入的需要判断为是否是ImageWithSuffix实例的对象
* @param resolution 缩放比例的分母,缩放比例为1/resolution
* @param style 绘制image的style
* @param width 绘制image的宽
* @param height 绘制image的高
* @return 返回宽为width,高为height,类型为TYPE_4BYTE_ABGR的image
*/
public static Image value2Image(Object value, int resolution, Style style, int width, int height) {
return CellUtils.value2Image(value, resolution, style, width, height);
}
}