Files
frameworks_base/media/java/android/media/videoeditor/EffectKenBurns.java
Gil Dobjanschi 048449ebfa Added ability to instantiate various implementations of the VideoEditor
Change-Id: I5b09afafff1c009bada4f49a5568286fe3cd9aef
2010-09-29 16:58:21 -07:00

89 lines
2.4 KiB
Java
Executable File

/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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 android.media.videoeditor;
import android.graphics.Rect;
/**
* This class represents a Ken Burns effect.
* {@hide}
*/
public class EffectKenBurns extends Effect {
// Instance variables
private Rect mStartRect;
private Rect mEndRect;
/**
* Objects of this type cannot be instantiated by using the default
* constructor
*/
@SuppressWarnings("unused")
private EffectKenBurns() {
this(null, null, null, null, 0, 0);
}
/**
* Constructor
*
* @param mediaItem The media item owner
* @param effectId The effect id
* @param startRect The start rectangle
* @param endRect The end rectangle
* @param startTimeMs The start time
* @param durationMs The duration of the Ken Burns effect in milliseconds
*/
public EffectKenBurns(MediaItem mediaItem, String effectId, Rect startRect, Rect endRect,
long startTimeMs, long durationMs) {
super(mediaItem, effectId, startTimeMs, durationMs);
mStartRect = startRect;
mEndRect = endRect;
}
/**
* @param startRect The start rectangle
*
* @throws IllegalArgumentException if start rectangle is incorrectly set.
*/
public void setStartRect(Rect startRect) {
mStartRect = startRect;
}
/**
* @return The start rectangle
*/
public Rect getStartRect() {
return mStartRect;
}
/**
* @param endRect The end rectangle
*
* @throws IllegalArgumentException if end rectangle is incorrectly set.
*/
public void setEndRect(Rect endRect) {
mEndRect = endRect;
}
/**
* @return The end rectangle
*/
public Rect getEndRect() {
return mEndRect;
}
}