Re: [libcroco-list] About CRStyle datastructure



Selon Benjamin Dauvergne <feanor-list tol-eressea org>:

> Are the current users of libcroco not using CrStyle in their code ?
Not that I know about. That's why I posted the mail... to see if I don't break
anything for someone somewhere.

> If they actually use it need they will now depend on libsewfox?
> I don't know if it is actually a good idea, maybe a separation between 
> libcroco-parse and a libcroco-style would do it.

Hmmh, well I tend to think that the style structure is usefull only in a
layouting/rendering context.
Today, sewfox has a layouter and a rendering widget.
The layouter builds a box model from an xml document and a style cascade,
and position each box in a 2 dimensional space.
The rendering widget takes the box model, and just "paint" it on screen.
(I know you know all this, but I say it just for the other people on the list
who may not be aware of this).

So, as I said earlier, I think that CRStyle is useful for the layouter and maybe
for some layer above it.
If something needs to be split, maybe it would be sewfox.
I would then separate the layouter from the renderer. That way, people willing
to use the layouter and build a pdf, ps or whatever type of renderer on top of
it can do it without being cluthered with gtk+ libraries... but that can be done
later when we really see the need of it.

> Anyway there will certainly be other renderers than libcroco ( an svg 
> renderer for example ) that will need some parsed property and not just 
> a pair composed of a property name and of some CrTerm's.

They will then build their own style datastructure. The SVG rendering model (for
example) is really different from the CSS2 rendering model. SVG guys use CSS
only as a syntaxic vector to carry style properties. They don't need our
CRStyle. They need to build their own one.


Thank you for your thoughts.

Regards,

Dodji.



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