本文整理汇总了Java中com.android.gallery3d.filtershow.filters.FilterRotateRepresentation.Rotation类的典型用法代码示例。如果您正苦于以下问题:Java Rotation类的具体用法?Java Rotation怎么用?Java Rotation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Rotation类属于com.android.gallery3d.filtershow.filters.FilterRotateRepresentation包,在下文中一共展示了Rotation类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOriginalToScreen
import com.android.gallery3d.filtershow.filters.FilterRotateRepresentation.Rotation; //导入依赖的package包/类
public static Matrix getOriginalToScreen(GeometryHolder holder, boolean rotate,
float originalWidth,
float originalHeight, float viewWidth, float viewHeight) {
int orientation = MasterImage.getImage().getZoomOrientation();
int rotation = getRotationForOrientation(orientation);
Rotation prev = holder.rotation;
rotation = (rotation + prev.value()) % 360;
holder.rotation = Rotation.fromValue(rotation);
Matrix m = getCropSelectionToScreenMatrix(null, holder, (int) originalWidth,
(int) originalHeight, (int) viewWidth, (int) viewHeight);
holder.rotation = prev;
return m;
}
示例2: needsDimensionSwap
import com.android.gallery3d.filtershow.filters.FilterRotateRepresentation.Rotation; //导入依赖的package包/类
public static boolean needsDimensionSwap(Rotation rotation) {
switch (rotation) {
case NINETY:
case TWO_SEVENTY:
return true;
default:
return false;
}
}