SSTVEncoder2/app/src/main/java/om/sstvencoder/TextOverlay/Label.java

126 lines
2.8 KiB
Java
Raw Normal View History

2017-01-03 18:32:45 +01:00
/*
Copyright 2017 Olga Miller <olga.rgb@gmail.com>
Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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.
*/
package om.sstvencoder.TextOverlay;
import android.graphics.Color;
import java.io.Serializable;
public class Label implements Serializable {
2017-03-04 15:47:30 +01:00
public static final float TEXT_SIZE_NORMAL = 2f;
public static final float BORDER_SIZE_NORMAL = 0.05f;
2017-01-03 18:32:45 +01:00
private String mText;
private float mTextSize, mBorderSize;
2017-01-03 18:32:45 +01:00
private String mFamilyName;
private boolean mBold, mItalic, mBorder;
private int mForeColor, mBackColor, mBorderColor;
2017-01-03 18:32:45 +01:00
public Label() {
mText = "";
2017-03-04 15:47:30 +01:00
mTextSize = TEXT_SIZE_NORMAL;
2017-01-03 18:32:45 +01:00
mFamilyName = null;
mBold = true;
mItalic = false;
mForeColor = Color.BLACK;
mBackColor = Color.TRANSPARENT;
mBorder = true;
2017-03-04 15:47:30 +01:00
mBorderSize = BORDER_SIZE_NORMAL;
mBorderColor = Color.WHITE;
2017-01-03 18:32:45 +01:00
}
public String getText() {
return mText;
}
public void setText(String text) {
if (text != null)
mText = text;
}
public float getTextSize() {
return mTextSize;
}
public void setTextSize(float size) {
if (size > 0f)
mTextSize = size;
2017-01-03 18:32:45 +01:00
}
public String getFamilyName() {
return mFamilyName;
}
public void setFamilyName(String familyName) {
mFamilyName = familyName;
}
public boolean getBold() {
return mBold;
}
public void setBold(boolean bold) {
mBold = bold;
}
public boolean getItalic() {
return mItalic;
}
public void setItalic(boolean italic) {
mItalic = italic;
}
public int getForeColor() {
return mForeColor;
}
public void setForeColor(int color) {
mForeColor = color;
}
public int getBackColor() {
return mBackColor;
}
public void setBackColor(int color) {
mBackColor = color;
}
public boolean getBorder() {
return mBorder;
}
public void setBorder(boolean border) {
mBorder = border;
}
public float getBorderSize() {
return mBorderSize;
}
public void setBorderSize(float size) {
mBorderSize = size;
}
public int getBorderColor() {
return mBorderColor;
}
public void setBorderColor(int color) {
mBorderColor = color;
}
2017-01-03 18:32:45 +01:00
}