/** * @see org.newdawn.slick.Game#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics) */ public void render(GameContainer container, Graphics g) throws SlickException { g.setColor(Color.white); g.texture(poly, image); ShapeRenderer.texture(poly, image, texPaint); }
/** * Draw the outline of the given shape. * * @param shape * The shape to draw. * @param fill * The fill type to apply */ public void draw(Shape shape, ShapeFill fill) { predraw(); TextureImpl.bindNone(); ShapeRenderer.draw(shape, fill); currentColor.bind(); postdraw(); }
/** * Draw the outline of the given shape. * * @param shape * The shape to draw. */ public void draw(Shape shape) { predraw(); TextureImpl.bindNone(); currentColor.bind(); ShapeRenderer.draw(shape); postdraw(); }
/** * Draw the the given shape filled in. * * @param shape * The shape to fill. */ public void fill(Shape shape) { predraw(); TextureImpl.bindNone(); currentColor.bind(); ShapeRenderer.fill(shape); postdraw(); }
/** * Draw the the given shape filled in with a texture * * @param shape * The shape to texture. * @param image * The image to tile across the shape * @param scaleX * The scale to apply on the x axis for texturing * @param scaleY * The scale to apply on the y axis for texturing * @param fit * True if we want to fit the image on to the shape */ public void texture(Shape shape, Image image, float scaleX, float scaleY, boolean fit) { predraw(); TextureImpl.bindNone(); currentColor.bind(); if (fit) { ShapeRenderer.textureFit(shape, image, scaleX, scaleY); } else { ShapeRenderer.texture(shape, image, scaleX, scaleY); } postdraw(); }
/** * Draw the outline of the given shape. * * @param shape * The shape to draw. * @param fill * The fill type to apply */ public void draw(@Nonnull Shape shape, @Nonnull ShapeFill fill) { predraw(); TextureImpl.bindNone(); ShapeRenderer.draw(shape, fill); currentColor.bind(); postdraw(); }
/** * Draw the outline of the given shape. * * @param shape * The shape to draw. */ public void draw(@Nonnull Shape shape) { predraw(); TextureImpl.bindNone(); currentColor.bind(); ShapeRenderer.draw(shape); postdraw(); }
/** * Draw the the given shape filled in. * * @param shape * The shape to fill. */ public void fill(@Nonnull Shape shape) { predraw(); TextureImpl.bindNone(); currentColor.bind(); ShapeRenderer.fill(shape); postdraw(); }