com.badlogic.gdx.scenes.scene2d.ui.Image.draw()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Image.draw()方法的一些代码示例,展示了Image.draw()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Image.draw()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Image
类名称:Image
方法名:draw

Image.draw介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

public void draw (Batch batch, float parentAlpha) {
  // if this actor is not within the view of the camera we don't draw it.
  if (isCulled()) return;
  // otherwise we draw via the super class method
  super.draw(batch, parentAlpha);
}

代码示例来源:origin: Var3D/var3dframe

public void draw(Batch batch, float parentAlpha) {
  bg0.act(Gdx.graphics.getDeltaTime());
  bg0.draw(batch, 1);
  super.draw(batch, parentAlpha);
}

代码示例来源: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();
  }
}

代码示例来源:origin: lycying/c2d-engine

@Override
  public void draw(Batch batch, float parentAlpha) {
    ShapeRenderer render = Engine.getShapeRenderer();

    render.setColor(color);
    render.begin(ShapeType.Filled);
    render.rect(getX(), getY(), Engine.getWidth() * this.getScaleX(), this.getHeight() * this.getScaleX());
    render.end();

    super.draw(batch, parentAlpha);
  }
}

相关文章