Cocos2dxBitmap.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:Kunonekok 作者:
private static int computeY(final FontMetricsInt fontMetricsInt,
        final int constrainHeight, final int totalHeight,
        final int verticalAlignment) {
    int y = -fontMetricsInt.top;

    if (constrainHeight > totalHeight) {
        switch (verticalAlignment) {
        case VERTICALALIGN_TOP:
            y = -fontMetricsInt.top;
            break;
        case VERTICALALIGN_CENTER:
            y = -fontMetricsInt.top + (constrainHeight - totalHeight)
                    / 2;
            break;
        case VERTICALALIGN_BOTTOM:
            y = -fontMetricsInt.top + (constrainHeight - totalHeight);
            break;
        default:
            break;
        }
    }

    return y;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号