gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/org/nongnu/libvob/vobs RectBgVob.java


From: Asko Soukka
Subject: [Gzz-commits] libvob/org/nongnu/libvob/vobs RectBgVob.java
Date: Wed, 26 Mar 2003 08:13:50 -0500

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Asko Soukka <address@hidden>    03/03/26 08:13:50

Modified files:
        org/nongnu/libvob/vobs: RectBgVob.java 

Log message:
        rectvob border fix

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/vobs/RectBgVob.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: libvob/org/nongnu/libvob/vobs/RectBgVob.java
diff -u libvob/org/nongnu/libvob/vobs/RectBgVob.java:1.1 
libvob/org/nongnu/libvob/vobs/RectBgVob.java:1.2
--- libvob/org/nongnu/libvob/vobs/RectBgVob.java:1.1    Sun Mar 16 10:46:22 2003
+++ libvob/org/nongnu/libvob/vobs/RectBgVob.java        Wed Mar 26 08:13:50 2003
@@ -41,7 +41,7 @@
  * surrounded by a rectangle of the current foreground color.
  */
 public class RectBgVob extends Vob {
-public static final String rcsid = "$Id: RectBgVob.java,v 1.1 2003/03/16 
15:46:22 benja Exp $";
+public static final String rcsid = "$Id: RectBgVob.java,v 1.2 2003/03/26 
13:13:50 humppake Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -138,16 +138,14 @@
                }
            } else {
                bgcall = (
-                   "Color "+ColorUtil.colorGLString(bgColor)+" 1\n" +
-                   "Begin QUAD_STRIP\n"+
-                   "Vertex 1 1\nVertex 1 0\n"+
-                   "Vertex 0 1\nVertex 0 0\n"+
-                   "End\n");
+                         "Color "+ColorUtil.colorGLString(bgColor)+" 1\n" +
+                         "Begin QUAD_STRIP\n"+
+                         "Vertex 1 1\nVertex 1 0\n"+
+                         "Vertex 0 1\nVertex 0 0\n"+
+                         "End\n");
            }
-
-           String glBorderColorString = "0 0 0";
-           if (borderColor != null)
-               glBorderColorString = ColorUtil.colorGLString(borderColor);
+    
+           if (drawBorder) bgcall += glBorderString();
 
            glList = GLRen.createCallListBoxCoorded(
                "PushAttrib CURRENT_BIT ENABLE_BIT\n"+
@@ -155,21 +153,30 @@
 
                bgcall +
 
-               "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"+
-
                 "PopAttrib\n"
                    );
        }
        vs.map.put(glList, coordsys1);
        return 0;
     }
+
+    protected String glBorderString() {
+       String glString = "";
+       String glBorderColorString = "0 0 0";
+       if (borderColor != null)
+           glBorderColorString = ColorUtil.colorGLString(borderColor);
+       glString += (
+                    "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" );
+       return glString;
+    }
+
 
     /** Adds one more solid color to be drawn inside
      * the cell.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]