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.
42 lines
1.4 KiB
42 lines
1.4 KiB
4 years ago
|
package com.fr.plugin.cool.cartnoon;
|
||
|
|
||
|
import com.fr.intelli.record.Focus;
|
||
|
import com.fr.intelli.record.Original;
|
||
|
import com.fr.record.analyzer.EnableMetrics;
|
||
|
import com.fr.script.AbstractFunction;
|
||
4 years ago
|
import com.fr.stable.Primitive;
|
||
4 years ago
|
import com.fr.stable.fun.Authorize;
|
||
|
|
||
|
import java.awt.*;
|
||
|
|
||
|
@EnableMetrics
|
||
|
@Authorize(callSignKey = com.fr.plugin.cool.cartnoon.FunConstants.PLUGIN_ID)
|
||
4 years ago
|
public class FRPrintText extends AbstractFunction {
|
||
4 years ago
|
@Override
|
||
4 years ago
|
@Focus(id = com.fr.plugin.cool.cartnoon.FunConstants.PLUGIN_ID, text = "Plugin-Function_FRPrintText", source = Original.PLUGIN)
|
||
4 years ago
|
public Object run(Object[] args) {
|
||
4 years ago
|
if(!FunConstants.Author()){
|
||
|
return FunConstants.AUTHOR_ERROR;
|
||
|
}
|
||
|
if(!FunConstants.CheckArgs(args,6)){
|
||
|
return Primitive.ERROR_VALUE;
|
||
|
}
|
||
4 years ago
|
final String text = args[0].toString();
|
||
|
|
||
|
int width= Integer.parseInt(args[1].toString());
|
||
|
int height= Integer.parseInt(args[2].toString());
|
||
|
int fontSize= Integer.parseInt(args[3].toString());
|
||
|
int rate= Integer.parseInt(args[4].toString());
|
||
|
final Color color = FunConstants.TextToColor(args[5].toString());
|
||
|
|
||
4 years ago
|
final String id=FunConstants.GetCellId(this);
|
||
|
final String url="/webroot/decision/url/img?id="+id;
|
||
4 years ago
|
|
||
4 years ago
|
FunConstants.CreatePrintAnimate(id,text,fontSize,rate,color,width);
|
||
|
return "<img src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" />";
|
||
4 years ago
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|