View Javadoc
1   package org.newdawn.slick.opengl.renderer;
2   
3   /**
4    * The description of a class able to render line strips through
5    * OpenGL
6    * 
7    * @author kevin
8    */
9   public interface LineStripRenderer {
10      /**
11       * Check if we should apply default line fixes
12       *
13       * @return True if we should apply GL fixes
14       */
15      public abstract boolean applyGLLineFixes();
16  
17      /**
18       * Start the line strips
19       */
20      public abstract void start();
21  
22      /**
23       * End the line strips
24       */
25      public abstract void end();
26  
27      /**
28       * Add a vertex
29       *
30       * @param x The x coordinate of the vertex
31       * @param y The y coordinate of the vertex
32       */
33      public abstract void vertex(float x, float y);
34  
35      /**
36       * Apply a colour to the next vertex
37       *
38       * @param r The red component of the colour
39       * @param g The green component of the colour
40       * @param b The blue component of the colour
41       * @param a The alpha component of the colour
42       */
43      public abstract void color(float r, float g, float b, float a);
44  
45      /**
46       * Set the width of the lines to be drawn
47       *
48       * @param width The width of the lines to be drawn
49       */
50      public abstract void setWidth(float width);
51  
52      /**
53       * Indicate whether antialiasing should be applied
54       *
55       * @param antialias True if antialiasing should be applied
56       */
57      public abstract void setAntiAlias(boolean antialias);
58  
59      /**
60       * Indicate if we should render end caps
61       *
62       * @param caps True if we should render end caps
63       */
64      public void setLineCaps(boolean caps);
65  
66  }