com.badlogic.gdx.scenes.scene2d.Stage.getDebugColor()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(95)

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

Stage.getDebugColor介绍

[英]The default color that can be used by actors to draw debug lines.
[中]演员可以用来绘制调试线的默认颜色。

代码示例

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

/** Draws a rectange for the bounds of this actor if {@link #getDebug()} is true. */
protected void drawDebugBounds (ShapeRenderer shapes) {
  if (!debug) return;
  shapes.set(ShapeType.Line);
  shapes.setColor(stage.getDebugColor());
  shapes.rect(x, y, originX, originY, width, height, scaleX, scaleY, rotation);
}

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

/** Draws a rectange for the bounds of this actor if {@link #getDebug()} is true. */
protected void drawDebugBounds (ShapeRenderer shapes) {
  if (!debug) return;
  shapes.set(ShapeType.Line);
  shapes.setColor(stage.getDebugColor());
  shapes.rect(x, y, originX, originY, width, height, scaleX, scaleY, rotation);
}

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

private void drawDebugRects (ShapeRenderer shapes) {
  if (debugRects == null || !getDebug()) return;
  shapes.set(ShapeType.Line);
  shapes.setColor(getStage().getDebugColor());
  float x = 0, y = 0;
  if (!isTransform()) {
    x = getX();
    y = getY();
  }
  for (int i = 0, n = debugRects.size; i < n; i++) {
    DebugRect debugRect = debugRects.get(i);
    shapes.setColor(debugRect.color);
    shapes.rect(x + debugRect.x, y + debugRect.y, debugRect.width, debugRect.height);
  }
}

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

private void drawDebugRects (ShapeRenderer shapes) {
  if (debugRects == null || !getDebug()) return;
  shapes.set(ShapeType.Line);
  shapes.setColor(getStage().getDebugColor());
  float x = 0, y = 0;
  if (!isTransform()) {
    x = getX();
    y = getY();
  }
  for (int i = 0, n = debugRects.size; i < n; i++) {
    DebugRect debugRect = debugRects.get(i);
    shapes.setColor(debugRect.color);
    shapes.rect(x + debugRect.x, y + debugRect.y, debugRect.width, debugRect.height);
  }
}

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

protected void drawDebugBounds (ShapeRenderer shapes) {
    super.drawDebugBounds(shapes);
    if (!getDebug()) return;
    shapes.set(ShapeType.Line);
    shapes.setColor(getStage().getDebugColor());
    shapes.rect(getX() + padLeft, getY() + padBottom, getOriginX(), getOriginY(), getWidth() - padLeft - padRight,
      getHeight() - padBottom - padTop, getScaleX(), getScaleY(), getRotation());
  }
}

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

protected void drawDebugBounds (ShapeRenderer shapes) {
    super.drawDebugBounds(shapes);
    if (!getDebug()) return;
    shapes.set(ShapeType.Line);
    shapes.setColor(getStage().getDebugColor());
    shapes.rect(getX() + padLeft, getY() + padBottom, getOriginX(), getOriginY(), getWidth() - padLeft - padRight,
      getHeight() - padBottom - padTop, getScaleX(), getScaleY(), getRotation());
  }
}

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

protected void drawDebugBounds (ShapeRenderer shapes) {
    super.drawDebugBounds(shapes);
    if (!getDebug()) return;
    shapes.set(ShapeType.Line);
    shapes.setColor(getStage().getDebugColor());
    shapes.rect(getX() + padLeft, getY() + padBottom, getOriginX(), getOriginY(), getWidth() - padLeft - padRight,
      getHeight() - padBottom - padTop, getScaleX(), getScaleY(), getRotation());
  }
}

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

protected void drawDebugBounds (ShapeRenderer shapes) {
    super.drawDebugBounds(shapes);
    if (!getDebug()) return;
    shapes.set(ShapeType.Line);
    shapes.setColor(getStage().getDebugColor());
    shapes.rect(getX() + padLeft, getY() + padBottom, getOriginX(), getOriginY(), getWidth() - padLeft - padRight,
      getHeight() - padBottom - padTop, getScaleX(), getScaleY(), getRotation());
  }
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

/** Draws a rectange for the bounds of this actor if {@link #getDebug()} is true. */
protected void drawDebugBounds (ShapeRenderer shapes) {
  if (!debug) return;
  shapes.set(ShapeType.Line);
  shapes.setColor(stage.getDebugColor());
  shapes.rect(x, y, originX, originY, width, height, scaleX, scaleY, rotation);
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

private void drawDebugRects (ShapeRenderer shapes) {
  if (debugRects == null || !getDebug()) return;
  shapes.set(ShapeType.Line);
  shapes.setColor(getStage().getDebugColor());
  float x = 0, y = 0;
  if (!isTransform()) {
    x = getX();
    y = getY();
  }
  for (int i = 0, n = debugRects.size; i < n; i++) {
    DebugRect debugRect = debugRects.get(i);
    shapes.setColor(debugRect.color);
    shapes.rect(x + debugRect.x, y + debugRect.y, debugRect.width, debugRect.height);
  }
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

@Override
protected void drawDebugBounds(ShapeRenderer shapes) {
  if (!getDebug()) return;
  shapes.set(ShapeRenderer.ShapeType.Line);
  shapes.setColor(getStage().getDebugColor());
  shapes.rect(getX(), getY(), getOriginX(), getOriginY(), getWidth(), getHeight(), 1f, 1f, getRotation());
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

protected void drawDebugBounds (ShapeRenderer shapes) {
    super.drawDebugBounds(shapes);
    if (!getDebug()) return;
    shapes.set(ShapeType.Line);
    shapes.setColor(getStage().getDebugColor());
    shapes.rect(getX() + padLeft, getY() + padBottom, getOriginX(), getOriginY(), getWidth() - padLeft - padRight,
      getHeight() - padBottom - padTop, getScaleX(), getScaleY(), getRotation());
  }
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

protected void drawDebugBounds (ShapeRenderer shapes) {
    super.drawDebugBounds(shapes);
    if (!getDebug()) return;
    shapes.set(ShapeType.Line);
    shapes.setColor(getStage().getDebugColor());
    shapes.rect(getX() + padLeft, getY() + padBottom, getOriginX(), getOriginY(), getWidth() - padLeft - padRight,
      getHeight() - padBottom - padTop, getScaleX(), getScaleY(), getRotation());
  }
}

相关文章