[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/view DimDecorator.java
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz/gzz/view DimDecorator.java |
Date: |
Sun, 29 Sep 2002 12:30:27 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 02/09/29 12:30:27
Modified files:
gzz/view : DimDecorator.java
Log message:
Fix dimensions' text
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/DimDecorator.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gzz/gzz/view/DimDecorator.java
diff -c gzz/gzz/view/DimDecorator.java:1.8 gzz/gzz/view/DimDecorator.java:1.9
*** gzz/gzz/view/DimDecorator.java:1.8 Sun Sep 29 10:53:45 2002
--- gzz/gzz/view/DimDecorator.java Sun Sep 29 12:30:27 2002
***************
*** 32,38 ****
* vob scene.
*/
public class DimDecorator implements FallbackSceneDecorator {
! String rcsid = "$Id: DimDecorator.java,v 1.8 2002/09/29 14:53:45 benja Exp $";
public static boolean dbg = true;
private static void p(String s) { if(dbg) pa(s); }
private static void pa(String s) { System.err.println(s); }
--- 32,38 ----
* vob scene.
*/
public class DimDecorator implements FallbackSceneDecorator {
! String rcsid = "$Id: DimDecorator.java,v 1.9 2002/09/29 16:30:27 benja Exp $";
public static boolean dbg = true;
private static void p(String s) { if(dbg) pa(s); }
private static void pa(String s) { System.err.println(s); }
***************
*** 45,52 ****
static Vob conn = new SimpleConnection(0, 0, 0, 0, Color.red);
static Object origKey = new Object(), viewKey = new Object();
static Object[] dimKeys = { new Object(), new Object(), new Object() };
- static Object boxKey = new Object();
public void render(VobScene sc, int into, Fallback fallback, Fallback.Win
win) {
//p("Placing DimDecorations");
--- 45,52 ----
static Vob conn = new SimpleConnection(0, 0, 0, 0, Color.red);
static Object origKey = new Object(), viewKey = new Object();
+ static Object boxKey = new Object(), whKey = new Object();
static Object[] dimKeys = { new Object(), new Object(), new Object() };
public void render(VobScene sc, int into, Fallback fallback, Fallback.Win
win) {
//p("Placing DimDecorations");
***************
*** 75,81 ****
sc.map.put(bg, cs_box);
int cs = sc.coordsys(targ[i], dimKeys[i], 0, 5, 5, 2, 2);
! sc.map.put(new TextVob(style, dims[i].name), cs);
}
View view = fallback.viewList[win.viewIndex];
--- 75,83 ----
sc.map.put(bg, cs_box);
int cs = sc.coordsys(targ[i], dimKeys[i], 0, 5, 5, 2, 2);
! int cs_wh = sc.coords.coordsys(0, 0, 0, 0, w-10, h-10);
! ((DefaultVobMatcher)sc.matcher).addSub(cs, cs_wh, whKey);
! sc.map.put(new TextVob(style, 1, dims[i].name), cs, cs_wh);
}
View view = fallback.viewList[win.viewIndex];
***************
*** 86,91 ****
--- 88,95 ----
float vw = style.getWidth(name, 1.6f), vh = style.getHeight(1.6f);
float vx = rect.width - vw - 10;
int cs = sc.coordsys(into, viewKey, 0, vx, 10, 2, 2);
+ int cs_wh = sc.coords.coordsys(0, 0, 0, 0, vw, vh);
+ ((DefaultVobMatcher)sc.matcher).addSub(cs, cs_wh, whKey);
sc.map.put(new TextVob(style, 1.6f, name), cs);
}
}