/[libvob]/libvob/org/nongnu/libvob/vobs/RectBgVob.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/vobs/RectBgVob.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by benja, Sun Mar 16 15:46:22 2003 UTC revision 1.2 by humppake, Wed Mar 26 13:13:50 2003 UTC
# Line 138  public static final String rcsid = "$Id$ Line 138  public static final String rcsid = "$Id$
138                  }                  }
139              } else {              } else {
140                  bgcall = (                  bgcall = (
141                      "Color "+ColorUtil.colorGLString(bgColor)+" 1\n" +                            "Color "+ColorUtil.colorGLString(bgColor)+" 1\n" +
142                      "Begin QUAD_STRIP\n"+                            "Begin QUAD_STRIP\n"+
143                      "Vertex 1 1\nVertex 1 0\n"+                            "Vertex 1 1\nVertex 1 0\n"+
144                      "Vertex 0 1\nVertex 0 0\n"+                            "Vertex 0 1\nVertex 0 0\n"+
145                      "End\n");                            "End\n");
146              }              }
147        
148              String glBorderColorString = "0 0 0";              if (drawBorder) bgcall += glBorderString();
             if (borderColor != null)  
                 glBorderColorString = ColorUtil.colorGLString(borderColor);  
149    
150              glList = GLRen.createCallListBoxCoorded(              glList = GLRen.createCallListBoxCoorded(
151                  "PushAttrib CURRENT_BIT ENABLE_BIT\n"+                  "PushAttrib CURRENT_BIT ENABLE_BIT\n"+
# Line 155  public static final String rcsid = "$Id$ Line 153  public static final String rcsid = "$Id$
153    
154                  bgcall +                  bgcall +
155    
                 "Color "+glBorderColorString+" 1\n"+  
                 "Begin LINE_STRIP\n"+  
                 "Vertex 1 1\n"+  
                 "Vertex 1 0\n"+  
                 "Vertex 0 0\n"+  
                 "Vertex 0 1\n"+  
                 "Vertex 1 1\n"+  
                 "End\n"+  
   
156                  "PopAttrib\n"                  "PopAttrib\n"
157                      );                      );
158          }          }
# Line 171  public static final String rcsid = "$Id$ Line 160  public static final String rcsid = "$Id$
160          return 0;          return 0;
161      }      }
162    
163        protected String glBorderString() {
164            String glString = "";
165            String glBorderColorString = "0 0 0";
166            if (borderColor != null)
167                glBorderColorString = ColorUtil.colorGLString(borderColor);
168            glString += (
169                         "Color "+glBorderColorString+" 1\n"+
170                         "Begin LINE_STRIP\n"+
171                         "Vertex 1 1\n"+
172                         "Vertex 1 0\n"+
173                         "Vertex 0 0\n"+
174                         "Vertex 0 1\n"+
175                         "Vertex 1 1\n"+
176                         "End\n" );
177            return glString;
178        }
179    
180    
181      /** Adds one more solid color to be drawn inside      /** Adds one more solid color to be drawn inside
182       * the cell.       * the cell.
183       */       */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26