[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz] 22nd
From: |
Benja Fallenstein |
Subject: |
[Gzz] 22nd |
Date: |
Mon, 23 Sep 2002 15:26:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1 |
- small fixes in linebreaking
- cell backgrounds are now shown in gl (i.e., cursors and clones)
- fix linebreaking on *my* screen:
Index: gzz/gzz/view/LinebrokenCellContentView.java
--- 105,136 ----
float scale) {
Object key = new Integer(start+1472);
s = s.substring(start, end);
+
+ /**
+ (Benja:) Ouch. The following line makes a great difference, even
though
+ that should really not be so.
+
+ Without this line, on *my* system (though not Tuomas'!), the text vobs
+ added by this method extend from 'start' till 's.length()'-- 'end'
+ seems to be ignored. That is, if 's' is "Foo bar baz", 'start' is 4
+ and 'end' is 8, the text shown on the screen is not "bar ", as intended,
+ but "bar baz". (The width used in linebreaking is "bar ", though.)
+
+ This means two things, apparently:
+ o My JVM handles substring() virtually, so 's.substring(start, end)'
+ is not a copy of a part of 's', but a subrange of the memory range
+ occupied by 's', starting at 'start' and spanning 'end-start'
+ characters. '""+s', on the other hand, creates a copy of 's'.
+ o Something on the C++ side does not respect the string length passed
+ to it by the JVM (it presumably thinks the string is
+ NUL-terminated). So, it displays all the text starting at 'start'
+ till the end of 's'.
+
+ Therefore, please don't remove the following line until you can be sure
+ the bug explained above has been fixed...
+ **/
+ s = ""+s;
+
if(dbg) pa("addVobs: "+start+" "+end+" '"+s+"'");
TextVob vob = new TextVob(style, scale, s, key);
ch.addBox(vob);
- Benja
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz] 22nd,
Benja Fallenstein <=