/*
* Catroid: An on-device visual programming system for Android devices
* Copyright (C) 2010-2016 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* An additional term exception under section 7 of the GNU Affero
* General Public License, version 3, is available at
* http://developer.catrobat.org/license_additional_term
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.catrobat.catroid.common.defaultprojectcreators;
import android.content.Context;
import org.catrobat.catroid.content.Project;
import java.io.IOException;
public abstract class DefaultProjectCreator {
protected static double backgroundImageScaleFactor = 1;
protected int standardProjectNameID;
protected static int calculateValueRelativeToScaledBackground(int value) {
int returnValue = (int) (value * backgroundImageScaleFactor);
int differenceToNextFive = returnValue % 5;
return returnValue - differenceToNextFive;
}
public Project createDefaultProject(String projectName, Context context) throws
IOException,
IllegalArgumentException {
return createDefaultProject(projectName, context, false);
}
public abstract Project createDefaultProject(String projectName, Context context, boolean
landscapeMode) throws
IOException,
IllegalArgumentException;
public int getDefaultProjectNameID() {
return standardProjectNameID;
}
}