org.tinygroup.imagecreator.impl.ConvertParameter Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) 1997-2013, tinygroup.org ([email protected]).
*
* Licensed under the GPL, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.gnu.org/licenses/gpl.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* --------------------------------------------------------------------------
* 版权 (c) 1997-2013, tinygroup.org ([email protected]).
*
* 本开源软件遵循 GPL 3.0 协议;
* 如果您不遵循此协议,则不被允许使用此文件。
* 你可以从下面的地址获取完整的协议文本
*
* http://www.gnu.org/licenses/gpl.html
*/
package org.tinygroup.imagecreator.impl;
import java.awt.Color;
import java.awt.Image;
/**
*
* @author luoguo
*
*/
public class ConvertParameter {
private static final int DEFAULT_SCALE = 1;
private static final int DEFAULT_COLOR_RANGE = 0;
private static final int DEFAULT_RADIAN_RANGE = 10;
private static final int DEFAULT_RADIAN = 0;
private static final int DEFAULT_HEIGHT = 80;
private static final int DEFAULT_WIDTH = 200;
private int width = DEFAULT_WIDTH;// 宽度
private int height = DEFAULT_HEIGHT;// 高度
private Color rectColor = Color.BLACK;// 边框颜色
private Color bgColor = Color.WHITE;// 背景颜色
private int disturbedLineNum = 0;// 干扰线条数
private String imageFormat = "JPEG";// 图像格式
private Color fontColor = Color.BLACK;// 字体颜色
private String fontName;// 字体名字
private int fontSize;// 字体大小
private double radian = DEFAULT_RADIAN;// 弧度
private int radianRange = DEFAULT_RADIAN_RANGE;// 随机弧度范围
private int colorRange = DEFAULT_COLOR_RANGE;// 颜色随机范围0-255
private double rotateX;
private double rotateY;
private double scale = DEFAULT_SCALE;// 放大系数
private Image bgImage = null;
public Image getBgImage() {
return bgImage;
}
public void setBgImage(Image bgImage) {
this.bgImage = bgImage;
}
public int getColorRange() {
return colorRange;
}
public void setColorRange(int colorRange) {
this.colorRange = colorRange;
}
public ConvertParameter() {
}
public int getRadianRange() {
return radianRange;
}
public void setRadianRange(int radianRange) {
this.radianRange = radianRange;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public Color getRectColor() {
return rectColor;
}
public void setRectColor(Color rectColor) {
this.rectColor = rectColor;
}
public Color getBgColor() {
return bgColor;
}
public void setBgColor(Color bgColor) {
this.bgColor = bgColor;
}
public int getDisturbedLineNum() {
return disturbedLineNum;
}
public void setDisturbedLineNum(int disturbedLineNum) {
this.disturbedLineNum = disturbedLineNum;
}
public String getImageFormat() {
return imageFormat;
}
public void setImageFormat(String imageFormat) {
this.imageFormat = imageFormat;
}
public Color getFontColor() {
return fontColor;
}
public void setFontColor(Color fontColor) {
this.fontColor = fontColor;
}
public String getFontName() {
return fontName;
}
public void setFontName(String fontName) {
this.fontName = fontName;
}
public int getFontSize() {
return fontSize;
}
public void setFontSize(int fontSize) {
this.fontSize = fontSize;
}
public double getRadian() {
return radian;
}
public void setRadian(double radian) {
this.radian = radian;
}
public double getRotateX() {
return rotateX;
}
public void setRotateX(double rotateX) {
this.rotateX = rotateX;
}
public double getRotateY() {
return rotateY;
}
public void setRotateY(double rotateY) {
this.rotateY = rotateY;
}
public double getScale() {
return scale;
}
public void setScale(double scale) {
this.scale = scale;
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy