/** 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); }
/** 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); }
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); } }
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); } }
public void drawDebug (ShapeRenderer shapes) { shapes.set(ShapeType.Filled); shapes.setColor(getColor()); shapes.rect(getX(), getY(), getOriginX(), getOriginY(), getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation()); } };
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()); } }
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()); } }
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()); } }
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()); } }
public void render(ShapeRenderer renderer){ renderer.set(ShapeType.Filled); renderer.setColor(COLOR); renderer.circle(position.x, position.y, radius); }
public void render(ShapeRenderer renderer) { renderer.set(ShapeType.Filled); renderer.setColor(COLOR); renderer.circle(position.x, position.y, radius); } }
public void render(ShapeRenderer shapeRenderer){ shapeRenderer.set(ShapeType.Filled); shapeRenderer.setColor(Color.RED); shapeRenderer.circle(position.x, position.y, radius, 20); } }
public void render(ShapeRenderer renderer) { renderer.set(ShapeType.Filled); renderer.setColor(COLOR); renderer.circle(position.x, position.y, baseRadius * radiusMultiplier); }
public void render(ShapeRenderer renderer) { // TODO: Set the ShapeRenderer's color renderer.setColor(Constants.ICICLE_COLOR); // TODO: Set the ShapeType renderer.set(ShapeType.Filled); // TODO: Draw the icicle using the size constants renderer.triangle( position.x, position.y, position.x - Constants.ICICLES_WIDTH / 2, position.y + Constants.ICICLES_HEIGHT, position.x + Constants.ICICLES_WIDTH / 2, position.y + Constants.ICICLES_HEIGHT ); } }
/** 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); }
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); } }
/** * Renders a blue rectangle showing the field of view of the closeup camera */ public void render(ShapeRenderer renderer) { if (!inCloseupMode) { // Figure out the location of the camera corners in the world Vector2 bottomLeft = myUnproject(closeupCamera, 0, closeupCamera.viewportHeight); Vector2 bottomRight = myUnproject(closeupCamera, closeupCamera.viewportWidth, closeupCamera.viewportHeight); Vector2 topRight = myUnproject(closeupCamera, closeupCamera.viewportWidth, 0); Vector2 topLeft = myUnproject(closeupCamera, 0, 0); // Draw a rectangle showing the closeup camera's field of view renderer.begin(ShapeType.Line); renderer.setColor(Color.BLUE); float[] poly = {bottomLeft.x, bottomLeft.y, bottomRight.x, bottomRight.y, topRight.x, topRight.y, topLeft.x, topLeft.y }; renderer.set(ShapeType.Line); renderer.polygon(poly); renderer.end(); } }
@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()); }
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()); } }
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()); } }