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

Re: [zzdev] Re: [Gzigzag-commits] gzigzag/Java/flob FTextLayouter.zob SimpleTextView.zob



Tuomas Lukka wrote:
> > > 1) definitely "(nearest) flob for this cell in this flobset", returning
> > >    exactly one flob

*snip*

> The issue is searching for flobs by cells. Which flob or flobs should
> be returned.

Well, if you have only one flob of a cell, it's easy: it should be
returned. If you have more than one, all should be returned; to make
this fast&consistent, I'd use a pointered list, so that you just return
one arbitrary flob out of all the flobs of this cell, and then check if
it's the beginning of a list.

When interpolating, finding the nearest flob doesn't make that much
sense; the following algorithm makes more sense to me:
o Find flob of that cell in both this and other flobset.
o If neither is the beginning of a list, interpolate to each other.
o If one is the beginning of a list, search the flob in the list which
is nearest to the single flob and interpolate them to each other.
o If both are the beginning of lists, use some good fast algorithm to
match the nearest flobs.

> > Well, stdlinks doesn't do its job right with repeated cells, so we do
> > need a solution for that. Maybe saving in the flobs what they're
> > supposed to be connected to?
> 
> Those connections can be drawn at the same time the flobs are placed.
> The real problem is the other connections: if there is a repeating
> structure, the structure of the links should repeat too.

Hmmm. I don't think I've really understood what you're talking about
yet... what are the two kinds of links, how should their structure
repeat and what's the problem with that?

-b.