[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz Documentation/VISION doc/pegboard/1010/PEG_...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz Documentation/VISION doc/pegboard/1010/PEG_... |
Date: |
Sun, 06 Oct 2002 13:37:46 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/06 13:37:46
Modified files:
Documentation : VISION
doc/pegboard/1010: PEG_1010.rst
gfx/demo : gldemo.py
gfx/jni : GzzGL-jni.cxx Makefile
gfx/librenderables: Renderables.cxx
gfx/libtext : Text.cxx Text.hxx
gzz/gfx/gl : GL.java
gzz/modules/pp : PlaneView.java demotest.py
Log message:
Various twiddles
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Documentation/VISION.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/1010/PEG_1010.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/gldemo.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/Makefile.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/Renderables.cxx.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtext/Text.cxx.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libtext/Text.hxx.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PlaneView.java.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gzz/Documentation/VISION
diff -c gzz/Documentation/VISION:1.2 gzz/Documentation/VISION:1.3
*** gzz/Documentation/VISION:1.2 Sat Oct 5 09:04:11 2002
--- gzz/Documentation/VISION Sun Oct 6 13:37:46 2002
***************
*** 18,23 ****
Computers should be easy to use but powerful.
! Structure
User interfaces
--- 18,40 ----
Computers should be easy to use but powerful.
! ---- Main areas (all strongly interrelated):
User interfaces
+
+ Structure
+
+ Storage
+ Eternal blocks of data identified by hashes.
+
+ Ability to search for Xu links outside local context
+
+ Blocks should move easily between machines
+
+ Redaction of parts of blocks when publishing around certain circle
+
+ Making smaller-resolution versions of blocks, signing for authenticity
+
+ Interaction with digital signatures
+
+ Pointers
Index: gzz/doc/pegboard/1010/PEG_1010.rst
diff -c gzz/doc/pegboard/1010/PEG_1010.rst:1.3
gzz/doc/pegboard/1010/PEG_1010.rst:1.4
*** gzz/doc/pegboard/1010/PEG_1010.rst:1.3 Sun Oct 6 13:24:00 2002
--- gzz/doc/pegboard/1010/PEG_1010.rst Sun Oct 6 13:37:46 2002
***************
*** 3,10 ****
=============================================================
:Authors: Tuomas Lukka
! :Date: $Date: 2002/10/06 17:24:00 $
! :Revision: $Revision: 1.3 $
:Status: Incomplete
Main benefits
--- 3,10 ----
=============================================================
:Authors: Tuomas Lukka
! :Date: $Date: 2002/10/06 17:37:46 $
! :Revision: $Revision: 1.4 $
:Status: Incomplete
Main benefits
***************
*** 32,63 ****
implemented internally by generating a set of parameters
for the parent type.
! For example, the buoytrans coordinate system, which is
! a translation to the location where the buoy should be,
! based on a
!
! (Benja:) Example? Is rotation derived from affine?
Parent coordinate system
A coordinate system through which the coordinates, having
been transformed by the child, are transformed::
! p_screen = parent(child(p))
! (Benja says:) Where ``p`` is the original point (in child coordsys),
``child()`` is the transformation of the coordsys itself,
``parent()`` is the transformation of the coordsys' parent,
and ``p_screen`` is the final point in screen coordinates.
All derived coordinate system types have exactly the same
parent coordinate system(s) and interpretations as the
! parent coordinate system type.
!
! (Benja:) I don't understand this. Is 'parent coordinate
! system type' the type of the parent coordsys or the
! coordinate system type *this* coordinate system type
! is derived from?
!
Currently all coordinate systems have only one parent.
The theoretical point here is that the parent coordinate
--- 32,60 ----
implemented internally by generating a set of parameters
for the parent type.
! For example, the buoytrans coordinate system, which is
! a translation to the location where the buoy should be,
! based on a point in an anchor coordinate system.
! This means that the buoy will move naturally when the
! anchor point moves, instead of linearly interpolating.
! However, the buoytrans function will never transform
! in any way that's not representable as a pure translation.
Parent coordinate system
A coordinate system through which the coordinates, having
been transformed by the child, are transformed::
! p_screen = parent(child(p)),
! where ``p`` is the original point (in child coordsys),
``child()`` is the transformation of the coordsys itself,
``parent()`` is the transformation of the coordsys' parent,
and ``p_screen`` is the final point in screen coordinates.
All derived coordinate system types have exactly the same
parent coordinate system(s) and interpretations as the
! parent coordinate system transformations.
!
Currently all coordinate systems have only one parent.
The theoretical point here is that the parent coordinate
Index: gzz/gfx/demo/gldemo.py
diff -c gzz/gfx/demo/gldemo.py:1.31 gzz/gfx/demo/gldemo.py:1.32
*** gzz/gfx/demo/gldemo.py:1.31 Sun Oct 6 09:43:56 2002
--- gzz/gfx/demo/gldemo.py Sun Oct 6 13:37:46 2002
***************
*** 264,274 ****
b,s = (Bindings(), Show())
global w
w = gfxapi.createWindow()
loadScenes()
scr = Screen(w, b, s)
AbstractUpdateManager.addWindow(scr)
AbstractUpdateManager.chg()
- w.setLocation(0,0,1024,768)
scenefile = args[0]
--- 264,274 ----
b,s = (Bindings(), Show())
global w
w = gfxapi.createWindow()
+ w.setLocation(0,0,1024,768)
loadScenes()
scr = Screen(w, b, s)
AbstractUpdateManager.addWindow(scr)
AbstractUpdateManager.chg()
scenefile = args[0]
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.43 gzz/gfx/jni/GzzGL-jni.cxx:1.44
*** gzz/gfx/jni/GzzGL-jni.cxx:1.43 Fri Oct 4 18:16:34 2002
--- gzz/gfx/jni/GzzGL-jni.cxx Sun Oct 6 13:37:46 2002
***************
*** 39,45 ****
RealFont(Text::Font *f) : f(f) {
rend = new Renderables::TextRenderer(f);
}
! int getGlyphWidth(int c) { return rend->g.getGlyphWidth(c); }
};
typedef std::vector<GLubyte> ByteVector;
--- 39,45 ----
RealFont(Text::Font *f) : f(f) {
rend = new Renderables::TextRenderer(f);
}
! float getGlyphWidth(int c) { return rend->g.getGlyphWidth(c); }
};
typedef std::vector<GLubyte> ByteVector;
***************
*** 671,687 ****
}
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_putFontWidths
! (JNIEnv *env, jclass, jint fontId, jshortArray widths) {
int arrayLength = env->GetArrayLength(widths);
! jshort *w = env->GetShortArrayElements(widths, 0);
RealFont *font = fonts.get(fontId);
for(int i=0; i<arrayLength; i++) {
w[i] = font->getGlyphWidth(i);
}
! env->ReleaseShortArrayElements(widths, w, 0);
}
--- 671,687 ----
}
JNIEXPORT void JNICALL Java_gzz_gfx_gl_GL_putFontWidths
! (JNIEnv *env, jclass, jint fontId, jfloatArray widths) {
int arrayLength = env->GetArrayLength(widths);
! jfloat *w = env->GetFloatArrayElements(widths, 0);
RealFont *font = fonts.get(fontId);
for(int i=0; i<arrayLength; i++) {
w[i] = font->getGlyphWidth(i);
}
! env->ReleaseFloatArrayElements(widths, w, 0);
}
Index: gzz/gfx/jni/Makefile
diff -c gzz/gfx/jni/Makefile:1.4 gzz/gfx/jni/Makefile:1.5
*** gzz/gfx/jni/Makefile:1.4 Mon Sep 23 04:24:25 2002
--- gzz/gfx/jni/Makefile Sun Oct 6 13:37:46 2002
***************
*** 2,15 ****
sources = GzzGL-jni.cxx paper-jni.cxx
! all: gzz_gfx_gl_GZZGL.h gzz_gfx_gl_Paper.h $(sources:.cxx=.o)
! include $(sources:.cxx=.dep)
!
! gzz_gfx_gl_GZZGL.h: ../../CLASSES/gzz/gfx/gl/GL.class
javah -classpath $(CLASSPATH):../../CLASSES gzz.gfx.gl.GL
gzz_gfx_gl_Paper.h: ../../CLASSES/gzz/gfx/gl/Paper.class
javah -classpath $(CLASSPATH):../../CLASSES gzz.gfx.gl.Paper
# GzzGL-jni.cxx: gzz_gfx_gl_GZZGL.h
# paper-jni.cxx: gzz_gfx_gl_Paper.h
--- 2,15 ----
sources = GzzGL-jni.cxx paper-jni.cxx
! all: gzz_gfx_gl_GL.h gzz_gfx_gl_Paper.h $(sources:.cxx=.o)
! gzz_gfx_gl_GL.h: ../../CLASSES/gzz/gfx/gl/GL.class
javah -classpath $(CLASSPATH):../../CLASSES gzz.gfx.gl.GL
gzz_gfx_gl_Paper.h: ../../CLASSES/gzz/gfx/gl/Paper.class
javah -classpath $(CLASSPATH):../../CLASSES gzz.gfx.gl.Paper
+
+ include $(sources:.cxx=.dep)
# GzzGL-jni.cxx: gzz_gfx_gl_GZZGL.h
# paper-jni.cxx: gzz_gfx_gl_Paper.h
Index: gzz/gfx/librenderables/Renderables.cxx
diff -c gzz/gfx/librenderables/Renderables.cxx:1.7
gzz/gfx/librenderables/Renderables.cxx:1.8
*** gzz/gfx/librenderables/Renderables.cxx:1.7 Thu Oct 3 14:13:32 2002
--- gzz/gfx/librenderables/Renderables.cxx Sun Oct 6 13:37:46 2002
***************
*** 312,357 ****
}
}
- /*
- namespace Gzz {
-
-
- #define TEXSIZE 128
- #define TEX2 512
-
- char turb[TEXSIZE][TEXSIZE][TEXSIZE][2];
- char cell[TEX2][TEX2][4];
- char spots[TEXSIZE][TEXSIZE][TEXSIZE];
- char col[TEXSIZE][TEXSIZE][TEXSIZE][3];
-
- using std::cerr;
-
- void read3File(const char *name, void *ptr, int b) {
- int n = b * TEXSIZE * TEXSIZE * TEXSIZE;
- FILE *f = fopen(name, "r");
- if(!f) {
- cerr << "Couldn't read 3file "<<name<<"\n";
- abort();
- }
- int i;
- // if(fread(ptr, n, 1, f) != n) abort();
- if((i = fread(ptr, 1, n, f)) != n) fprintf(stderr, "Reading : %d of
%d\n", i, n);
- fclose(f);
- }
-
- void read2File(const char *name, void *ptr, int b) {
- int n = b * TEX2 * TEX2 ;
- FILE *f = fopen(name, "r");
- if(!f) {
- cerr << "Couldn't read 2file "<<name<<"\n";
- abort();
- }
- int i;
- // if(fread(ptr, n, 1, f) != n) abort();
- if((i = fread(ptr, 1, n, f)) != n) fprintf(stderr, "Reading : %d of
%d\n", i, n);
- fclose(f);
- }
- }
- */
-
-
--- 312,314 ----
Index: gzz/gfx/libtext/Text.cxx
diff -c gzz/gfx/libtext/Text.cxx:1.4 gzz/gfx/libtext/Text.cxx:1.5
*** gzz/gfx/libtext/Text.cxx:1.4 Wed Aug 21 03:12:43 2002
--- gzz/gfx/libtext/Text.cxx Sun Oct 6 13:37:46 2002
***************
*** 46,65 ****
FT_GlyphSlot slot = face->glyph;
FT_Bitmap *bitmap = &(slot->bitmap);
! return Glyph(GlyphInfo(-slot->bitmap_top, slot->bitmap_left,
! bitmap->width, bitmap->rows,
! slot->advance.x >> 6),
! Raster<Mosaic::Format::Alpha>(bitmap->width,
bitmap->rows,
! vector<GLubyte>(
! bitmap->buffer, bitmap->buffer + bitmap->width
* bitmap->rows)
));
}
int FTFont::getLineHeight() {
! return face->size->metrics.height >> 6;
}
int FTFont::getLineOffset() {
! return face->size->metrics.ascender >> 6;
}
--- 46,71 ----
FT_GlyphSlot slot = face->glyph;
FT_Bitmap *bitmap = &(slot->bitmap);
! float ps = this->pixsize;
!
! return Glyph(GlyphInfo(
! -slot->bitmap_top / ps, slot->bitmap_left / ps,
! bitmap->width / ps, bitmap->rows / ps,
! (slot->advance.x >> 6) / ps,
! 1/ps,
! bitmap->width, bitmap->rows
! ),
! Raster<Mosaic::Format::Alpha>(bitmap->width, bitmap->rows,
! vector<GLubyte>(
! bitmap->buffer, bitmap->buffer + bitmap->width * bitmap->rows)
));
}
int FTFont::getLineHeight() {
! return (face->size->metrics.height >> 6) / (float)pixsize;
}
int FTFont::getLineOffset() {
! return (face->size->metrics.ascender >> 6) / (float)pixsize;
}
Index: gzz/gfx/libtext/Text.hxx
diff -c gzz/gfx/libtext/Text.hxx:1.9 gzz/gfx/libtext/Text.hxx:1.10
*** gzz/gfx/libtext/Text.hxx:1.9 Wed Oct 2 08:23:48 2002
--- gzz/gfx/libtext/Text.hxx Sun Oct 6 13:37:46 2002
***************
*** 28,41 ****
*/
class GlyphInfo {
public:
! GlyphInfo(int top, int left, int width, int height, int xadvance) :
! top(top), left(left), width(width), height(height),
xadvance(xadvance) { }
GlyphInfo() : top(0), left(0), width(0), height(0), xadvance(0) { }
! int top;
! int left;
! int width;
! int height;
! int xadvance;
friend ostream& operator<<(ostream& o, const GlyphInfo &g) ;
};
--- 28,48 ----
*/
class GlyphInfo {
public:
! GlyphInfo(float top, float left, float width, float height,
! float xadvance, float scaleFromPixels,
! short iwidth, short iheight) :
! top(top), left(left), width(width), height(height),
! xadvance(xadvance), scaleFromPixels(scaleFromPixels),
! iwidth(iwidth), iheight(iheight) { }
GlyphInfo() : top(0), left(0), width(0), height(0), xadvance(0) { }
! float top;
! float left;
! float width;
! float height;
! float xadvance;
! float scaleFromPixels;
! short iwidth;
! short iheight;
friend ostream& operator<<(ostream& o, const GlyphInfo &g) ;
};
***************
*** 65,75 ****
Glyph withBorder(int texels) {
// Empty glyphs remain empty.
if(extents.width == 0) return *this;
return Glyph(
GlyphInfo(
! extents.top - 1 * texels, extents.left - 1 * texels,
! extents.width + 2 * texels, extents.height + 2 * texels,
! extents.xadvance
),
raster.addBorder(texels, 0));
}
--- 72,86 ----
Glyph withBorder(int texels) {
// Empty glyphs remain empty.
if(extents.width == 0) return *this;
+ float scale = extents.scaleFromPixels;
+ float st = scale * texels;
return Glyph(
GlyphInfo(
! extents.top - 1 * st, extents.left - 1 * st,
! extents.width + 2 * st, extents.height + 2 * st,
! extents.xadvance,
! extents.scaleFromPixels,
! extents.iwidth + 2 * texels, extents.iheight + 2 * texels
),
raster.addBorder(texels, 0));
}
***************
*** 196,202 ****
Glyph g = face->getRaster(i);
if(g.extents.width == 0 || g.extents.height == 0)
continue;
! MosaicTile tile = mosaic.alloc(g.extents.width,
g.extents.height);
DBG(dbg_glyphdetails) << "MTile: "<<tile<<"\n";
tile.loadImage(g.raster);
glyphs[i] = QuadGlyph(g, tile.getRect());
--- 207,213 ----
Glyph g = face->getRaster(i);
if(g.extents.width == 0 || g.extents.height == 0)
continue;
! MosaicTile tile = mosaic.alloc(g.extents.iwidth,
g.extents.iheight);
DBG(dbg_glyphdetails) << "MTile: "<<tile<<"\n";
tile.loadImage(g.raster);
glyphs[i] = QuadGlyph(g, tile.getRect());
***************
*** 225,231 ****
}
/** Get the width of a single glyph.
*/
! int getGlyphWidth(Char c) {
if((unsigned)c >= glyphs.size()) return 0;
DBG(dbg_glyphdetails) << "Glyphwidth: "<<((int)c)<<"
"<<glyphs[c].glyph.extents.xadvance<<" valid:"<<glyphs[c].valid()<< "\n";
if(!glyphs[c].valid() && c != ' ') return 0;
--- 236,242 ----
}
/** Get the width of a single glyph.
*/
! float getGlyphWidth(Char c) {
if((unsigned)c >= glyphs.size()) return 0;
DBG(dbg_glyphdetails) << "Glyphwidth: "<<((int)c)<<"
"<<glyphs[c].glyph.extents.xadvance<<" valid:"<<glyphs[c].valid()<< "\n";
if(!glyphs[c].valid() && c != ' ') return 0;
Index: gzz/gzz/gfx/gl/GL.java
diff -c gzz/gzz/gfx/gl/GL.java:1.10 gzz/gzz/gfx/gl/GL.java:1.11
*** gzz/gzz/gfx/gl/GL.java:1.10 Fri Oct 4 18:16:34 2002
--- gzz/gzz/gfx/gl/GL.java Sun Oct 6 13:37:46 2002
***************
*** 512,518 ****
protected void deleteObj() { deleteFont(getId()); }
public float getHeight() { return height; }
public float getYOffs() { return yoffs; }
! public void getWidths(short[] w) { putFontWidths(getId(), w); }
}
static public Font createFont(String name, int loadPt) {
return new Font(createFontImpl(name, loadPt));
--- 512,518 ----
protected void deleteObj() { deleteFont(getId()); }
public float getHeight() { return height; }
public float getYOffs() { return yoffs; }
! public void getWidths(float[] w) { putFontWidths(getId(), w); }
}
static public Font createFont(String name, int loadPt) {
return new Font(createFontImpl(name, loadPt));
***************
*** 521,527 ****
static private native float getFontYOffs(int id);
static private native int createFontImpl(String name, int loadPt);
static private native void deleteFont(int id);
! static private native void putFontWidths(int id, short[] w);
//--------- DisplayList
static public class DisplayList extends NonRenderableJavaObject{
--- 521,527 ----
static private native float getFontYOffs(int id);
static private native int createFontImpl(String name, int loadPt);
static private native void deleteFont(int id);
! static private native void putFontWidths(int id, float[] w);
//--------- DisplayList
static public class DisplayList extends NonRenderableJavaObject{
Index: gzz/gzz/modules/pp/PlaneView.java
diff -c gzz/gzz/modules/pp/PlaneView.java:1.46
gzz/gzz/modules/pp/PlaneView.java:1.47
*** gzz/gzz/modules/pp/PlaneView.java:1.46 Sun Oct 6 09:45:46 2002
--- gzz/gzz/modules/pp/PlaneView.java Sun Oct 6 13:37:46 2002
***************
*** 39,45 ****
*/
public class PlaneView {
! public static final String rcsid = "$Id: PlaneView.java,v 1.46 2002/10/06
13:45:46 tjl Exp $";
public static boolean dbg = true;
private static void pa(String s) { System.err.println(s); }
--- 39,45 ----
*/
public class PlaneView {
! public static final String rcsid = "$Id: PlaneView.java,v 1.47 2002/10/06
17:37:46 tjl Exp $";
public static boolean dbg = true;
private static void pa(String s) { System.err.println(s); }
***************
*** 84,90 ****
Vob v = new TextVob(style, 1, note.t());
! vs.put(v, note, 5, notex, notey, dw, dh);
if(note.equals(cursor)) {
int cursorx = (int)style.getWidth(note.t()
--- 84,90 ----
Vob v = new TextVob(style, 1, note.t());
! vs.put(v, note, 5, notex, notey, 100, 100);
if(note.equals(cursor)) {
int cursorx = (int)style.getWidth(note.t()
Index: gzz/gzz/modules/pp/demotest.py
diff -c gzz/gzz/modules/pp/demotest.py:1.1 gzz/gzz/modules/pp/demotest.py:1.2
*** gzz/gzz/modules/pp/demotest.py:1.1 Sun Oct 6 09:45:46 2002
--- gzz/gzz/modules/pp/demotest.py Sun Oct 6 13:37:46 2002
***************
*** 22,30 ****
Win.initDims(space)
! ppactions.newNote(id, 10, 10, "10,10")
! ppactions.newNote(id, 100, 10, "100,10")
! ppactions.newNote(id, 10, 100, "10,100")
class PlaneViewScene:
--- 22,29 ----
Win.initDims(space)
! ppactions.newNote(id, 100, 100, "WIgdqp")
! ppactions.newNote(id, 100, 200, "Foog")
class PlaneViewScene:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz Documentation/VISION doc/pegboard/1010/PEG_...,
Tuomas J. Lukka <=