com.nervousync.commons.beans.image.CutOptions Maven / Gradle / Ivy
/*
* Licensed to the Nervousync Studio (NSYC) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 com.nervousync.commons.beans.image;
import com.nervousync.commons.core.Globals;
/**
* Images options of cut operate
* @author Steven Wee [email protected]
* @version $Revision: 1.0 $ $Date: May 1, 2018 5:36:55 PM $
*/
public final class CutOptions {
/**
* Begin position X, default value is 0
*/
private int positionX = Globals.DEFAULT_VALUE_INT;
/**
* Begin position Y, default value is 0
*/
private int positionY = Globals.DEFAULT_VALUE_INT;
/**
* Cut width
*/
private int cutWidth = Globals.DEFAULT_VALUE_INT;
/**
* Cut height
*/
private int cutHeight = Globals.DEFAULT_VALUE_INT;
/**
* Initialize cut options using default position X and Y
* @param cutWidth Cut width
* @param cutHeight Cut height
*/
public CutOptions(int cutWidth, int cutHeight) {
this.positionX = 0;
this.positionY = 0;
this.cutWidth = cutWidth;
this.cutHeight = cutHeight;
}
/**
* Initialize cut options with given position X and Y
* @param positionX Cut begin position X
* @param positionY Cut begin position Y
* @param cutWidth Cut width
* @param cutHeight Cut height
*/
public CutOptions(int positionX, int positionY, int cutWidth, int cutHeight) {
this.positionX = positionX;
this.positionY = positionY;
this.cutWidth = cutWidth;
this.cutHeight = cutHeight;
}
/**
* @return the positionX
*/
public int getPositionX() {
return positionX;
}
/**
* @return the positionY
*/
public int getPositionY() {
return positionY;
}
/**
* @return the cutWidth
*/
public int getCutWidth() {
return cutWidth;
}
/**
* @return the cutHeight
*/
public int getCutHeight() {
return cutHeight;
}
}