本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Image.rotateBy()
方法的一些代码示例,展示了Image.rotateBy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Image.rotateBy()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Image
类名称:Image
方法名:rotateBy
暂无
代码示例来源:origin: oakes/libgdx-examples
boolean rotatePiece(Image piece) {
int pixelCount = countPixels(0, 0, viewWidth, viewHeight);
piece.rotateBy(90);
if (pixelCount != countPixels(0, 0, viewWidth, viewHeight)) {
piece.rotateBy(-90);
return false;
}
return true;
}
代码示例来源:origin: peakgames/libgdx-stagebuilder
@Override
public void draw (Batch batch, float parentAlpha) {
super.draw(batch, parentAlpha);
foregroundImage.rotateBy(5);
if(fullScreen) {
batch.end();
Gdx.gl.glEnable(GL20.GL_BLEND);
Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
shapeRenderer.setProjectionMatrix(batch.getProjectionMatrix());
shapeRenderer.begin(ShapeType.Filled);
shapeRenderer.setColor(0f, 0f, 0f, alpha);
shapeRenderer.rect(0, 0, boundaryWidth, boundaryHeight);
shapeRenderer.end();
Gdx.gl.glDisable(GL20.GL_BLEND);
batch.begin();
this.backgroundImage.draw(batch, parentAlpha);
this.foregroundImage.draw(batch, parentAlpha);
if(messageLabel != null) {
this.messageLabel.draw(batch, parentAlpha);
}
}
if (timeOutDuration > 0 && this.showTime + this.timeOutDuration < System.currentTimeMillis()) {
this.hide();
}
}
内容来源于网络,如有侵权,请联系作者删除!