/** * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer) */ public void init(GameContainer container) throws SlickException { container.getGraphics().setBackground(Color.white); InkscapeLoader.RADIAL_TRIANGULATION_LEVEL = 2; // renderer[0] = new SimpleDiagramRenderer(InkscapeLoader.load("testdata/svg/orc.svg")); // renderer[1] = new SimpleDiagramRenderer(InkscapeLoader.load("testdata/svg/head2.svg")); // renderer[2] = new SimpleDiagramRenderer(InkscapeLoader.load("testdata/svg/head3.svg")); renderer[3] = new SimpleDiagramRenderer(InkscapeLoader.load("testdata/svg/clonetest.svg")); // renderer[4] = new SimpleDiagramRenderer(InkscapeLoader.load("testdata/svg/cow.svg")); container.getGraphics().setBackground(new Color(0.5f,0.7f,1.0f)); }
/** * @see org.newdawn.slick.Game#render(GameContainer, Graphics) */ public void render(GameContainer container, Graphics g) throws SlickException { g.translate(x, 0); SimpleDiagramRenderer.render(g, morph); }