You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Thierry Kormann <tk...@sophia.inria.fr> on 2001/03/08 14:39:49 UTC
important commit: new bridge in place
Hi,
After 3 weeks of hard work, I have finally commited a new implementation of
the bridge module. All the classes have been re-written from scratch so
regressions may appear in our test files.
Here is a list of the major changes, regressions and things I have to
complete in short term.
------------------------------------------------------------------------------------
--- Major changes ---
------------------------------------------------------------------------------------
1. SVGUtilities is no more a place where all the SVG static convenient
methods are dropped. 3 new classes have been created.
* ViewBox.java : handle viewBox and preserveAspectRation transform.
* PaintServer : similar to what the SVG concept, the PaintServer provides
convenient functions to manage Paint, Pattern, Markers...
* TextUtilities : a place where to drop text utility methods
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PS: Only SVGTextElementBridge has not been cleaned.
2. PaintBridge no longer has 2 methods (one for 'stroke', one for 'fill').
The single method createPaint takes an additional parameter which represents
the opacity for the Paint object to create.
3. Many code is now shared through class inheritance.
As an example, here are some new classes:
- AbstractGraphicsNodeBridge (the super class of most of the
GraphicsNodeBridge) handles filter, clip, transform, mask, visibility.
- SVGAbstractFilterPrimitiveElementBridge is the super class of all filter
primitives and provide some convient functions as well.
4. Every SVG elements have now their dedicated bridge. This includes the
gradient's <stop> element for example or the feFunc[A|R|G|B] elements of the
feComponentTransfer.
------------------------------------------------------------------------------------
--- Improvements ---
------------------------------------------------------------------------------------
1. Tons of bug fix (especially percentages, attributes syntax, units,
viewport lookup...)
2. Error handling. Though the bonus provided by this implementation is not
available yet, we will be able to provide the line number and a more
user-friendly error message.
3. Many useless code has been removed.
------------------------------------------------------------------------------------
--- Regressions ---
------------------------------------------------------------------------------------
1. I haven't notice regressions yet. Only the scripting has not been added at
this time. I will try to fix that next week.
------------------------------------------------------------------------------------
--- Things I will complete in short term ---
------------------------------------------------------------------------------------
1. Add scripting support in the bridge (I plan to implement a new
architecture - probably move some code from one place to another).
2. Line number on error messages (even when building an external file)
3. Move the document loading process from the svg component to the bridge (to
provide line number)
4. Change the way we detect what an image format is. At this time, we are
relying on an exception mecanism (- try to load an SVG document, if it fails,
try to load a raster image).
I have written a class that could detect an file format according to the PNG,
JPG or GZIP magic number. I will discuss with Thomas for this issue.
5. A complete review of how the event are dispatched (AWTEventDispatcher). My
issue just concerns the responsability of each class rather than a new
implementation.
6. Allow the SVGComponent to display the current state of a document when an
error occured.
7. After reviewing the SVGPatternElementBridge with vincent, we agreed that
some things have to be fixed. This include clip and overflow CSS properties.
8. I found a bug when percentages are used in CSS properties. BTW we now pass
the Units.svg example from Jon expect for the stroke-width. I will fix that
with stephane.
9. All errors have now an appropriate error code (provided by the
ErrorConstants interface).
-----------------------------
That's all for today. Please do *not* hesitate to send me a request if you
want to add/improve/fix something in the bridge. I will probably find the
correct place to put things/patches... or the convenient methods to use
faster than you - I hope so :) My concern is really to keep this part as
consistent and maintainable as possible.
Regards,
Thierry.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org