[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gzz/vob/vobs/SimpleConnection.java gzz/vob/...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz gzz/vob/vobs/SimpleConnection.java gzz/vob/... |
Date: |
Mon, 25 Nov 2002 06:15:17 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/11/25 06:15:16
Modified files:
gzz/vob/vobs : SimpleConnection.java
gzz/vob/linebreaking: HBox.java
. : TODO
doc/pegboard/w2sx--tjl: peg.rst
gfx/librenderables: renderables.py
gzz/view : DimDecorator.java
Log message:
fixing decorations
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/vobs/SimpleConnection.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/linebreaking/HBox.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.416&tr2=1.417&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/w2sx--tjl/peg.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.151&tr2=1.152&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/DimDecorator.java.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.416 gzz/TODO:1.417
--- gzz/TODO:1.416 Mon Nov 25 06:04:56 2002
+++ gzz/TODO Mon Nov 25 06:15:16 2002
@@ -72,12 +72,8 @@
- fix views (and other) to use TextVob correctly through HBox.place(),
maybe this should be documented somewhere
- make test for TextVob drawn through CellView
- - fix using AbstractUpdateManager in both clients
- - AWT updates faster than set defaultAnimationTime
- - GL updates slower than set defaultAnimationTime
- + GL uses currently linear animation, but its propably for
- demos (xupdf etc?)... maybe it could still be set so, that
- it won't affect the general client
+ + fix using AbstractUpdateManager:
+ + animation is faster than defaultAnimationTime
tjl:
- return ANKOS to Agora
- demo movie of irregu general stuff
Index: gzz/doc/pegboard/w2sx--tjl/peg.rst
diff -u gzz/doc/pegboard/w2sx--tjl/peg.rst:1.3
gzz/doc/pegboard/w2sx--tjl/peg.rst:1.4
--- gzz/doc/pegboard/w2sx--tjl/peg.rst:1.3 Thu Nov 14 10:40:08 2002
+++ gzz/doc/pegboard/w2sx--tjl/peg.rst Mon Nov 25 06:15:16 2002
@@ -3,9 +3,9 @@
=============================================================
:Author: Tuomas Lukka
-:Last-Modified: $Date: 2002/11/14 15:40:08 $
-:Revision: $Revision: 1.3 $
-:Status: Accepted
+:Last-Modified: $Date: 2002/11/25 11:15:16 $
+:Revision: $Revision: 1.4 $
+:Status: Implemented
Many places in the API use w and h like ::
Index: gzz/gfx/librenderables/renderables.py
diff -u gzz/gfx/librenderables/renderables.py:1.151
gzz/gfx/librenderables/renderables.py:1.152
--- gzz/gfx/librenderables/renderables.py:1.151 Fri Nov 22 10:23:11 2002
+++ gzz/gfx/librenderables/renderables.py Mon Nov 25 06:15:16 2002
@@ -476,6 +476,32 @@
{
"Type": "2",
+ "Name": "ColoredLineConnector",
+ "Data": "float dz1, dz2, red, green, blue, alpha;",
+ "Params": "float dz1, float dz2, float red, float green, float blue, float
alpha",
+ "ParamCode": """ this->dz1 = dz1; this->dz2 = dz2;
+ this->red = red; this->green;
+ this->blue = blue; this->alpha = alpha;""",
+ "RenderCode" : """
+ ZPt p1 = coords1.transform(ZPt(0,0,0));
+ ZPt p2 = coords2.transform(ZPt(0,0,0));
+ p1.z += dz1;
+ p2.z += dz2;
+ glPushAttrib(GL_CURRENT_BIT);
+ glPushAttrib(GL_ENABLE_BIT);
+ glDisable(GL_TEXTURE_2D);
+ glColor4f(red, green, blue, alpha);
+ glBegin(GL_LINE_STRIP);
+ glVertex3f(p1.x, p1.y, p1.z);
+ glVertex3f(p2.x, p2.y, p2.z);
+ glEnd();
+ glPopAttrib();
+ glPopAttrib();
+ """
+},
+
+{
+ "Type": "2",
"Name": "SqFilletConnection",
"Data": "float width;int flags; float blendw; int power;",
"Params": "float width, int flags, float blendw, int power",
Index: gzz/gzz/view/DimDecorator.java
diff -u gzz/gzz/view/DimDecorator.java:1.18 gzz/gzz/view/DimDecorator.java:1.19
--- gzz/gzz/view/DimDecorator.java:1.18 Sat Nov 23 08:44:20 2002
+++ gzz/gzz/view/DimDecorator.java Mon Nov 25 06:15:16 2002
@@ -34,7 +34,7 @@
* vob scene.
*/
public class DimDecorator implements FallbackSceneDecorator {
-String rcsid = "$Id: DimDecorator.java,v 1.18 2002/11/23 13:44:20 benja Exp $";
+String rcsid = "$Id: DimDecorator.java,v 1.19 2002/11/25 11:15:16 humppake 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); }
@@ -48,6 +48,7 @@
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() };
+ static Object[] dimRectKeys = { new Object(), new Object(), new Object() };
/** The spacing between the boxes with the different dimensions.
*/
@@ -76,12 +77,16 @@
sc.orthoBoxCS(into, dimKeys[1], 0, 0, h+space, 1, 1, w, h),
sc.orthoBoxCS(into, dimKeys[2], 0, w+space, h+space, 1, 1, w, h)
};
-
+ int targ_unitSq[] = new int[3];
+
for(int i=0; i<3; i++) {
+ int cs = sc.orthoCS(targ[i], dimKeys[i], 0, 5, 5, h-10, h-10);
+ /* XXX Because we cannot give depth for UnisSQ it, and negative
+ depth for TextVob crashes AWT we should create background cs. */
+ targ_unitSq[i] = sc.unitSqCS(targ[i], dimRectKeys[0]);
+
sc.map.put(conn, targ[i], orig);
- sc.map.put(bg, targ[i]);
-
- int cs = sc.orthoCS(targ[i], dimKeys[i], 0, 5, 5, h-10, h-10);
+ sc.map.put(bg, targ_unitSq[i]);
sc.map.put(new TextVob(style, dims[i].name), cs);
}
Index: gzz/gzz/vob/linebreaking/HBox.java
diff -u gzz/gzz/vob/linebreaking/HBox.java:1.2
gzz/gzz/vob/linebreaking/HBox.java:1.3
--- gzz/gzz/vob/linebreaking/HBox.java:1.2 Thu Nov 21 22:55:20 2002
+++ gzz/gzz/vob/linebreaking/HBox.java Mon Nov 25 06:15:16 2002
@@ -33,7 +33,7 @@
*/
public interface HBox {
-String rcsid = "$Id: HBox.java,v 1.2 2002/11/22 03:55:20 humppake Exp $";
+String rcsid = "$Id: HBox.java,v 1.3 2002/11/25 11:15:16 humppake Exp $";
float getWidth(float scale);
@@ -97,10 +97,9 @@
vs.coords.getSqSize(box, boxwh);
float h = boxwh[1];
*/
-
float h = getHeight(scale)+getDepth(scale);
- int cs_box = vs.scaleCS(box, "textbox", h, h);
- vs.map.put(this, cs_box);
+ int cs_scale = vs.scaleCS(box, "textbox", h, h);
+ vs.map.put(this, cs_scale);
}
public Object getKey() { return null; /* XXX */ }
Index: gzz/gzz/vob/vobs/SimpleConnection.java
diff -u gzz/gzz/vob/vobs/SimpleConnection.java:1.1
gzz/gzz/vob/vobs/SimpleConnection.java:1.2
--- gzz/gzz/vob/vobs/SimpleConnection.java:1.1 Fri Nov 1 20:23:46 2002
+++ gzz/gzz/vob/vobs/SimpleConnection.java Mon Nov 25 06:15:16 2002
@@ -31,7 +31,7 @@
*/
public class SimpleConnection extends Vob {
-public static final String rcsid = "$Id: SimpleConnection.java,v 1.1
2002/11/02 01:23:46 benja Exp $";
+public static final String rcsid = "$Id: SimpleConnection.java,v 1.2
2002/11/25 11:15:16 humppake Exp $";
float x0, y0, x1, y1;
Color color;
@@ -77,7 +77,13 @@
int[] list, int curs, int coordsys1,
int coordsys2) {
if(line == null) {
- line = GLRen.createLineConnector(1, 1);
+ if(color != null)
+ line = GLRen.createColoredLineConnector(1, 1,
+ color.getRed()/255f,
+ color.getGreen()/255f,
+ color.getBlue()/255f,
+ 1);
+ else line = GLRen.createLineConnector(1, 1);
}
curs = line.addToListGL(win, list, curs, coordsys1, coordsys2);
return curs;
- [Gzz-commits] gzz gzz/vob/vobs/SimpleConnection.java gzz/vob/...,
Asko Soukka <=