当前位置: 首页>>代码示例>>Java>>正文


Java Edge.RIGHT属性代码示例

本文整理汇总了Java中com.edmodo.cropper.cropwindow.edge.Edge.RIGHT属性的典型用法代码示例。如果您正苦于以下问题:Java Edge.RIGHT属性的具体用法?Java Edge.RIGHT怎么用?Java Edge.RIGHT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.edmodo.cropper.cropwindow.edge.Edge的用法示例。


在下文中一共展示了Edge.RIGHT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAspectRatio

/**
 * Gets the aspect ratio of the resulting crop window if this handle were
 * dragged to the given point.
 *
 * @param x the x-coordinate
 * @param y the y-coordinate
 * @return the aspect ratio
 */
private float getAspectRatio(float x, float y) {

    // Replace the active edge coordinate with the given touch coordinate.
    final float left = (mVerticalEdge == Edge.LEFT) ? x : Edge.LEFT.getCoordinate();
    final float top = (mHorizontalEdge == Edge.TOP) ? y : Edge.TOP.getCoordinate();
    final float right = (mVerticalEdge == Edge.RIGHT) ? x : Edge.RIGHT.getCoordinate();
    final float bottom = (mHorizontalEdge == Edge.BOTTOM) ? y : Edge.BOTTOM.getCoordinate();

    final float aspectRatio = AspectRatioUtil.calculateAspectRatio(left, top, right, bottom);

    return aspectRatio;
}
 
开发者ID:g82,项目名称:open-mygirl-android-gradle,代码行数:20,代码来源:HandleHelper.java

示例2: getAspectRatio

/**
 * Gets the aspect ratio of the resulting crop window if this handle were
 * dragged to the given point.
 * 
 * @param x the x-coordinate
 * @param y the y-coordinate
 * @return the aspect ratio
 */
private float getAspectRatio(float x, float y) {

    // Replace the active edge coordinate with the given touch coordinate.
    final float left = (mVerticalEdge == Edge.LEFT) ? x : Edge.LEFT.getCoordinate();
    final float top = (mHorizontalEdge == Edge.TOP) ? y : Edge.TOP.getCoordinate();
    final float right = (mVerticalEdge == Edge.RIGHT) ? x : Edge.RIGHT.getCoordinate();
    final float bottom = (mHorizontalEdge == Edge.BOTTOM) ? y : Edge.BOTTOM.getCoordinate();

    final float aspectRatio = AspectRatioUtil.calculateAspectRatio(left, top, right, bottom);

    return aspectRatio;
}
 
开发者ID:wangeason,项目名称:PhotoViewCropper,代码行数:20,代码来源:HandleHelper.java

示例3: a

private float a(float f, float f1)
{
    float f2;
    float f3;
    if (c == Edge.LEFT)
    {
        f2 = f;
    } else
    {
        f2 = Edge.LEFT.getCoordinate();
    }
    if (b == Edge.TOP)
    {
        f3 = f1;
    } else
    {
        f3 = Edge.TOP.getCoordinate();
    }
    if (c != Edge.RIGHT)
    {
        f = Edge.RIGHT.getCoordinate();
    }
    if (b != Edge.BOTTOM)
    {
        f1 = Edge.BOTTOM.getCoordinate();
    }
    return AspectRatioUtil.calculateAspectRatio(f2, f3, f, f1);
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:28,代码来源:c.java

示例4: getAspectRatio

/**
 * Gets the aspect ratio of the resulting crop window if this handle were dragged to the given
 * point.
 *
 * @param x the x-coordinate
 * @param y the y-coordinate
 *
 * @return the aspect ratio
 */
private float getAspectRatio(float x, float y) {

    // Replace the active edge coordinate with the given touch coordinate.
    final float left = (mVerticalEdge == Edge.LEFT) ? x : Edge.LEFT.getCoordinate();
    final float top = (mHorizontalEdge == Edge.TOP) ? y : Edge.TOP.getCoordinate();
    final float right = (mVerticalEdge == Edge.RIGHT) ? x : Edge.RIGHT.getCoordinate();
    final float bottom = (mHorizontalEdge == Edge.BOTTOM) ? y : Edge.BOTTOM.getCoordinate();

    return AspectRatioUtil.calculateAspectRatio(left, top, right, bottom);
}
 
开发者ID:edmodo,项目名称:cropper,代码行数:19,代码来源:HandleHelper.java


注:本文中的com.edmodo.cropper.cropwindow.edge.Edge.RIGHT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。