spriteBatch.end();
- renderer.begin(ShapeType.FilledRectangle);
+ renderer.begin(ShapeType.Filled);
renderer.setColor(Color.BLACK);
- renderer.filledRect(x - 3, y - 3, 6, 6);
+ renderer.rect(x - 3, y - 3, 6, 6);
renderer.end();
float baseline = y - font.getCapHeight();
renderer.line(0, y - font.getLineHeight(), 9999, y - font.getLineHeight());
renderer.end();
- renderer.begin(ShapeType.Rectangle);
+ renderer.begin(ShapeType.Line);
renderer.setColor(Color.BLUE);
renderer.rect(x, y, bounds.width, -bounds.height);
renderer.end();
\r
spriteBatch.end();\r
\r
- renderer.begin(ShapeType.Rectangle);\r
+ renderer.begin(ShapeType.Line);\r
renderer.rect(x, viewHeight - y, x + alignmentWidth, 300);\r
renderer.end();\r
}\r
transform.rotate(0, 0, 1, (float)Math.toDegrees(angle));\r
\r
// render the box\r
- renderer.begin(ShapeType.Rectangle);\r
+ renderer.begin(ShapeType.Line);\r
renderer.setTransformMatrix(transform);\r
renderer.setColor(1, 1, 1, 1);\r
renderer.rect(-halfWidth, -halfHeight, halfWidth * 2, halfHeight * 2);\r
\r
renderer.setProjectionMatrix(stage.getCamera().combined);\r
\r
- renderer.begin(ShapeType.Box);\r
+ renderer.begin(ShapeType.Line);\r
renderer.box(x, y, 0, size, size, 0);\r
renderer.end();\r
\r
\r
timer += Gdx.graphics.getDeltaTime();\r
Vector2 current = getCurrentPosition();\r
- renderer.begin(ShapeType.FilledRectangle);\r
- renderer.filledRect(current.x, current.y, 20, 20);\r
+ renderer.begin(ShapeType.Filled);\r
+ renderer.rect(current.x, current.y, 20, 20);\r
renderer.end();\r
\r
stage.act(Gdx.graphics.getDeltaTime());\r
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
camera.update();\r
renderer.setProjectionMatrix(camera.combined);\r
- renderer.begin(ShapeType.FilledTriangle);\r
+ renderer.begin(ShapeType.Filled);\r
int size = Math.max(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()) / 10;\r
for (int i = 0; i < 10; i++) {\r
if (Gdx.input.isTouched(i) == false) continue;\r
float y = Gdx.graphics.getHeight() - Gdx.input.getY(i) - 1;\r
Color color = colors[i % colors.length];\r
renderer.setColor(color);\r
- renderer.filledTriangle(x, y + size, x + size, y - size, x - size, y - size);\r
+ renderer.triangle(x, y + size, x + size, y - size, x - size, y - size);\r
}\r
renderer.end();\r
}\r
renderer.end();\r
\r
renderer.setColor(Color.BLUE);\r
- renderer.begin(ShapeType.FilledCircle);\r
+ renderer.begin(ShapeType.Filled);\r
\r
- renderer.filledCircle(worldOriginX, worldOriginY, 4);\r
+ renderer.circle(worldOriginX, worldOriginY, 4);\r
\r
renderer.end();\r
\r
// Some debug rendering, bounding box & origin of one sprite\r
renderer.setProjectionMatrix(camera.combined);\r
renderer.setColor(Color.GREEN);\r
- renderer.begin(ShapeType.Rectangle);\r
+ renderer.begin(ShapeType.Line);\r
\r
PolygonSprite sprite = sprites.get(49);\r
\r
\r
renderer.end();\r
\r
- renderer.begin(ShapeType.FilledCircle);\r
+ renderer.begin(ShapeType.Filled);\r
\r
- renderer.filledCircle(sprite.getX() + sprite.getOriginX(), sprite.getY() + sprite.getOriginY(), 4);\r
+ renderer.circle(sprite.getX() + sprite.getOriginX(), sprite.getY() + sprite.getOriginY(), 4);\r
\r
renderer.end();\r
}\r
Gdx.gl.glEnable(GL10.GL_BLEND);\r
Gdx.gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\r
\r
- renderer.begin(ShapeType.Rectangle);\r
+ renderer.begin(ShapeType.Line);\r
renderer.setColor(1, 0, 0, 0.5f);\r
renderer.rect(0, 0, 100, 200);\r
renderer.end();\r
\r
- renderer.begin(ShapeType.FilledRectangle);\r
+ renderer.begin(ShapeType.Filled);\r
renderer.setColor(0, 1, 0, 0.5f);\r
- renderer.filledRect(200, 0, 100, 100);\r
+ renderer.rect(200, 0, 100, 100);\r
renderer.end();\r
\r
- renderer.begin(ShapeType.Circle);\r
+ renderer.begin(ShapeType.Line);\r
renderer.setColor(0, 1, 0, 0.5f);\r
renderer.circle(400, 50, 50);\r
renderer.end();\r
\r
- renderer.begin(ShapeType.FilledCircle);\r
+ renderer.begin(ShapeType.Filled);\r
renderer.setColor(1, 0, 1, 0.5f);\r
- renderer.filledCircle(500, 50, 50);\r
+ renderer.circle(500, 50, 50);\r
renderer.end();\r
}\r
\r
// star.draw(batch);\r
// font.draw(batch, "This font was packed!", 26, 65);\r
badlogicSmall.draw(batch);\r
- renderer.begin(ShapeType.Rectangle);\r
+ renderer.begin(ShapeType.Line);\r
renderer.rect(10, 10, 256, 256);\r
renderer.end();\r
// batch.draw(jumpAnimation.getKeyFrame(time, true), 100, 100);\r
renderer.setProjectionMatrix(camera.combined);\r
\r
// Render the 'lerp' vector target as a circle\r
- renderer.begin(ShapeType.FilledCircle);\r
+ renderer.begin(ShapeType.Filled);\r
renderer.setColor(1.0f, 0, 0, 0.3f);\r
- renderer.filledCircle(-2 + lerpTarget.x, 2 + lerpTarget.y , 0.08f, 16);\r
+ renderer.circle(-2 + lerpTarget.x, 2 + lerpTarget.y , 0.08f, 16);\r
renderer.end();\r
\r
renderer.begin(ShapeType.Line);\r
public void render () {\r
Gdx.gl.glClearColor(0, 0, 0, 1);\r
Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
- renderer.begin(ShapeType.FilledRectangle);\r
+ renderer.begin(ShapeType.Filled);\r
if (Gdx.input.isTouched())\r
renderer.setColor(Color.RED);\r
else\r
renderer.setColor(Color.GREEN);\r
- renderer.filledRect(Gdx.input.getX() - 15, Gdx.graphics.getHeight() - Gdx.input.getY() - 15, 30, 30);\r
+ renderer.rect(Gdx.input.getX() - 15, Gdx.graphics.getHeight() - Gdx.input.getY() - 15, 30, 30);\r
renderer.end();\r
}\r
\r