[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO gfx/demo/brokentext.py gfx/demo/view...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz ./TODO gfx/demo/brokentext.py gfx/demo/view... |
Date: |
Tue, 19 Nov 2002 03:51:01 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/11/19 03:50:59
Modified files:
. : TODO
gfx/demo : brokentext.py viewtest.py
Log message:
brokentextdemo
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.403&tr2=1.404&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/brokentext.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/viewtest.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.403 gzz/TODO:1.404
--- gzz/TODO:1.403 Mon Nov 18 05:28:15 2002
+++ gzz/TODO Tue Nov 19 03:50:59 2002
@@ -189,6 +189,10 @@
+ speed up tests: currently too much execfile().. could
pre-compile and exec compiled in the same globals().
humppake:
+ - try to fix: text is printed in too small font in opengl client (or AWT
+ draws it as too big ;), spaces (glues) in linebreakingcellview are
+ too big
+ - opengl demo, which uses view (made in python)
- rethink interfaces between PlainVanishing and VobScene
eg. correct implementation of LollipopCellView needs
to affect connections' coordsys (through box?)
@@ -197,8 +201,6 @@
- UMLs would be good
- more about PEG1018 - generalizing VobVanishingClient
- finish LollipopCellView
- - opengl demo, which uses view (made in python)
- + make brokentext demo work again
+ fix the way nonlinearity of coordsys is handled.
Needs a slightly better approach, with also
direction of nonlinearity taken into account.
Index: gzz/gfx/demo/brokentext.py
diff -u gzz/gfx/demo/brokentext.py:1.5 gzz/gfx/demo/brokentext.py:1.6
--- gzz/gfx/demo/brokentext.py:1.5 Tue Oct 1 05:16:18 2002
+++ gzz/gfx/demo/brokentext.py Tue Nov 19 03:50:59 2002
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2002, Benja Fallenstein
+# Copyright (c) 2002, Benja Fallenstein, Asko Soukka
#
# You may use and distribute under the terms of either the GNU Lesser
# General Public License, either version 2 of the license or,
@@ -15,32 +15,37 @@
# file for more details.
#
+from gzz.view import BoxCellView, LinebrokenCellContentView
+from gzz.client import GraphicsAPI
-import gzz
-from test.tools import tools
+from viewtest import TestViewContext
-space = gzz.impl.ModularSpace(*tools.spaceArgList())
-c = space.N()
-
-style = GraphicsAPI.getInstance().getTextStyle("serif", 0, 14)
-v = gzz.view.LinebrokenCellContentView(style)
+context = TestViewContext()
+context.style = GraphicsAPI.getInstance().getTextStyle("serif", 0, 14)
+context.ccv = gzz.view.LinebrokenCellContentView(context.style)
+context.cv = gzz.view.BoxCellView()
+c = context.space.N()
class Scene:
- def key(self, key): pass
+ def __init__(self):
+ self.scale = 1
+ self.bgcolor = (0.8, 0.8, 0.8)
def scene(self, vs):
- putnoc(vs, background((1,1,1)))
- w = 600
- h = v.getHeight(c, w, 1)
-
- print vs.coords
- cs = vs.coordsys(0, 'key', 0, 100, 100, 2, 2)
- v.place(c, vs, cs, w, h, None, 1)
+ self.size = vs.getSize()
+ putnoc(vs, background(self.bgcolor))
+ contentBox = vs.orthoBoxCS(0, "contentBox", 0,
+ 100,100,
+ 1, 1,
+ self.size.width-200,
+ self.size.height-200)
+ context.cv.place(c, vs, contentBox, context)
+ print c.t()
+
+ def key(self, key): pass
currentScene = Scene()
-
-
c.setText("""\
News:
Index: gzz/gfx/demo/viewtest.py
diff -u gzz/gfx/demo/viewtest.py:1.2 gzz/gfx/demo/viewtest.py:1.3
--- gzz/gfx/demo/viewtest.py:1.2 Mon Nov 18 05:28:16 2002
+++ gzz/gfx/demo/viewtest.py Tue Nov 19 03:50:59 2002
@@ -20,7 +20,7 @@
from gzz.view import ViewContext, LollipopCellView, LinebrokenCellContentView,
\
View, TextCellContentView
from gzz.impl import ModularSpace
-from gzz.zzutil.Ids import *
+from gzz.zzutil.Ids import d_1, d_2, d_3
from test.tools import tools
@@ -33,11 +33,9 @@
self.space = ModularSpace(*tools.spaceArgList())
self.style = GraphicsAPI.getInstance().getTextStyle("SansSerif",
Font.PLAIN, 10)
- d1 = self.space.getDim(gzz.zzutil.Ids.d_1)
- d2 = self.space.getDim(gzz.zzutil.Ids.d_2)
- d3 = self.space.getDim(gzz.zzutil.Ids.d_3)
-
- self.d = [d1, d2, d3]
+ self.d = [self.space.getDim(d_1),
+ self.space.getDim(d_2),
+ self.space.getDim(d_3)]
self.v = TestView()
self.cv = LollipopCellView()
self.ccv = LinebrokenCellContentView(self.style)
@@ -45,12 +43,12 @@
#let's build da space :)
self.home.setText("This is the home cell of this test space.")
- self.home.N(d1, 1).setText("plus d . one")
- self.home.N(d1, -1).setText("minus d . one")
- self.home.N(d2, 1).setText("plus d . two")
- self.home.N(d2, -1).setText("minus d . two")
- self.home.N(d3, 1).setText("plus d . three")
- self.home.N(d3, -1).setText("minus d . three")
+ self.home.N(self.d[0], 1).setText("plus d . one")
+ self.home.N(self.d[0], -1).setText("minus d . one")
+ self.home.N(self.d[1], 1).setText("plus d . two")
+ self.home.N(self.d[1], -1).setText("minus d . two")
+ self.home.N(self.d[2], 1).setText("plus d . three")
+ self.home.N(self.d[2], -1).setText("minus d . three")
def getAccursed(self):
return self.home
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO gfx/demo/brokentext.py gfx/demo/view...,
Asko Soukka <=