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

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

> Tuomas Lukka wrote:
> > On Fri, 24 Nov 2000, Benjamin Fallenstein wrote:
> > > FText change: bg and fg colors, parts which aren't cells, parts make
> > > actual flobs or rends (so that applitudes can subclass). This
> > > temporarily breaks nile -- sorry, I'll try to fix ASAP.
> > 
> > I was thinking: to save memory trampling, maybe font and colors should be
> > parts of a style object that could be reused? Flyweight pattern.
> You sure that would really save so much? I mean, we're reusing colors
> and fonts right now, too, don't we? And a new object has some overhead
> of itself, too. 

True - it depends on how many parts there are in ftext. In Java, the
overhead is something like 8 bytes per object.
> Oh well, once we make fonts scaleable, we'll probably need objects for
> them anyway. But then I don't think we want to put colors into that,
> because we want only one scaleable font object for every font, not one
> for every font and color combination.

> p.s. Thanks for fixing the add(Renderable) and add(Flob) bug. I didn't
> DREAM of that being the reason for the flobs not being interpolated! :/

Neither did I. I just did a into->dump() in Nile1.raster and saw that the
text was placed in a renderable, not flob.