You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Thomas E Deweese <th...@kodak.com> on 2002/08/28 22:38:27 UTC

[RE] RE: Using Batik as a HTML CSS engine

>>>>> "SC" == Sam Cheung <sy...@yahoo.com> writes:

SC> Thomas, Thanks a lot for your feedback.  So what I need to do
SC> implement a HTML css engine based on the abstract CSS engine in
SC> Batik?

SC> 1. come up a ValueManager for HTML CSS.  
SC> 2. come up a ShortHandManager for HTML css.

    Just to be 100% clear it will most likely be a set of
ValueManager's and ShorthandManagers (in the worst case one for each
HTML CSS property, many can probably be mostly borrowed from the SVG
CSS properties already in Batik).

SC> anything else?

    You will likely need to implement batik.css.engine.CSSContext.
Most of the methods here are pretty simple (or can be stolen from
Batik's implementation in batik.bridge.BridgeContext).  However the
two hard one's to implement are 'getBlockWidth' and 'getBlockHeight').

    Remember while Batik has a CSS Parser and CSS Cascade engine it
does not have a CSS Block Layout engine.  So if you want to calculate
the proper size of HTML tables for example you are in for a lot of
work (in fact I'm thinking that the Batik CSS structure isn't
sufficent for this case).  If you just want to know the bg color for
the table then it should be pretty easy.

    Perhaps I/we didn't make this as clear as it should have been at
the start.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org