Android翻页效果,电子书(9)
来源:未知 责任编辑:责任编辑 发表时间:2015-09-17 09:43 点击:次
this.mPageTurnCorner.x = 0.0F;
this.mPageTurnCorner.y = height;
this.mOppositeCorner.x = width;
this.mOppositeCorner.y = 0.0F;
float x0 = this.mPivotX;
float cornerIntersect = height * width / (height + width);
if ((this.mCorner & 0x1) != 0) {
this.mPageTurnCorner.x = width;
this.mOppositeCorner.x = 0.0F;
x0 = width - x0;
}
if ((this.mCorner & 0x2) != 0) {
this.mPageTurnCorner.y = 0.0F;
this.mOppositeCorner.y = height;
}
this.mPageDim.x = width;
this.mPageDim.y = height;
float page_slope;
if (this.mPivotX <= cornerIntersect) {
page_slope = firstHalfPageTurn(this.mPageDim, this.mPageTurnCorner, this.mOppositeCorner, x0, slope, y);
} else {
page_slope = secondHalfPageTurn(this.mPageDim, this.mPageTurnCorner, this.mOppositeCorner, x0, slope, y);
}
this.mRotation = (float)Math.atan(page_slope);
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>