gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz-commits] gzz/gzz/view LinebrokenCellContentView.java


From: Benja Fallenstein
Subject: Re: [Gzz-commits] gzz/gzz/view LinebrokenCellContentView.java
Date: Sat, 11 Jan 2003 22:43:55 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9

Asko Soukka wrote:
Sat, 11 Jan 2003, Benja Fallenstein wrote:

Another way to do this is could be the way I did finding font size in
AWT's ScalableFont. Recursive function, which starts from the middle of
the strint and checks is the wanted position greater or lesser, splits
string into half, and starts a new recursions with the correct half. Of
course this needs a little optimization, e.g. check first shoudl the
cursor be either at the beginning or at the end of the line.

I don't understand this. Can you explain in terms of, "When the user
hits the 'Up' key, the computer..."? :-)


Now, when I think this second time, probably this is too complicated for
that :) Because the line has only about 80 character's it could be better
to do only one dummy loop, which stops when a character far enough from
the beginning of the line is caught.

Ok, I understand now. :-) Yes, since the number of characters is bounded, we don't need anything as advanced as binary search.

The real problem is knowing where the lines start. This information is in the HBroken objects, which we can get from LinebreakingCCV, but we need to get the correct LCCV with the correct font and the correct box size that is also used on screen, and this is non-trivial. Hmm.

Maybe you can trick it for PP somehow, because the scale & maxwidth is the same in all PP cells?

- Benja





reply via email to

[Prev in Thread] Current Thread [Next in Thread]