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 tk...@apache.org on 2001/02/06 10:31:12 UTC
cvs commit: xml-batik/sources/org/apache/batik/experiment TextPathElementBridge.java
tkormann 01/02/06 01:31:12
Modified: sources/org/apache/batik/bridge BridgeContext.java
CSSUtilities.java ConcreteGVTBuilder.java
SVGAElementBridge.java
SVGClipPathElementBridge.java
SVGFeBlendElementBridge.java
SVGFeColorMatrixElementBridge.java
SVGFeComponentTransferElementBridge.java
SVGFeCompositeElementBridge.java
SVGFeConvolveMatrixElementBridge.java
SVGFeDiffuseLightingElementBridge.java
SVGFeDisplacementMapElementBridge.java
SVGFeFloodElementBridge.java
SVGFeGaussianBlurElementBridge.java
SVGFeImageElementBridge.java
SVGFeMergeElementBridge.java
SVGFeMorphologyElementBridge.java
SVGFeOffsetElementBridge.java
SVGFeSpecularLightingElementBridge.java
SVGFeTileElementBridge.java
SVGFeTurbulenceElementBridge.java
SVGFilterElementBridge.java SVGGElementBridge.java
SVGGradientBridge.java SVGImageElementBridge.java
SVGLinearGradientBridge.java
SVGMarkerElementBridge.java
SVGMaskElementBridge.java
SVGPatternElementBridge.java
SVGRadialGradientBridge.java
SVGSVGElementBridge.java SVGShapeElementBridge.java
SVGSwitchElementBridge.java
SVGTextElementBridge.java SVGUseElementBridge.java
sources/org/apache/batik/experiment
TextPathElementBridge.java
Log:
huge commit to simplify the way to get the style in the bridge.
The get/setViewCSS methods have been removed from the BridgeContext.
An additional method on CSSUtilities has been added: getComputedStyle(element).
Notice that now, you don't need to save/restore the ViewCSS for external
reference or documents anymore. Just use the CSSUtilities.getComputedStyle
method.
Revision Changes Path
1.10 +2 -23 xml-batik/sources/org/apache/batik/bridge/BridgeContext.java
Index: BridgeContext.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/BridgeContext.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- BridgeContext.java 2001/02/05 13:06:10 1.9
+++ BridgeContext.java 2001/02/06 09:30:46 1.10
@@ -45,16 +45,11 @@
* a SVG DOM tree such as the current viewport or the user agent.
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: BridgeContext.java,v 1.9 2001/02/05 13:06:10 tkormann Exp $
+ * @version $Id: BridgeContext.java,v 1.10 2001/02/06 09:30:46 tkormann Exp $
*/
public class BridgeContext implements SVGConstants {
/**
- * The view CSS.
- */
- protected ViewCSS viewCSS;
-
- /**
* The GVT builder that might be used to create a GVT subtree.
*/
protected GVTBuilder gvtBuilder;
@@ -160,8 +155,7 @@
/**
* Should be partially removed when removing the ViewCSS from the bridge.
*/
- void initialize(SVGDocument svgDocument, GVTBuilder gvtBuilder) {
- this.viewCSS = (ViewCSS)svgDocument.getRootElement();
+ void initialize(GVTBuilder gvtBuilder) {
this.gvtBuilder = gvtBuilder;
}
@@ -255,21 +249,6 @@
*/
public void setViewport(Viewport newViewport) {
this.viewport = newViewport;
- }
-
- /**
- * Returns the view CSS.
- */
- public ViewCSS getViewCSS() {
- return viewCSS;
- }
-
- /**
- * Sets the view CSS used to access the style to the specified view CSS.
- * @param newViewCSS the new view CSS to consider
- */
- public void setViewCSS(ViewCSS newViewCSS) {
- this.viewCSS = newViewCSS;
}
//
1.10 +31 -36 xml-batik/sources/org/apache/batik/bridge/CSSUtilities.java
Index: CSSUtilities.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/CSSUtilities.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CSSUtilities.java 2001/02/06 01:56:35 1.9
+++ CSSUtilities.java 2001/02/06 09:30:46 1.10
@@ -63,7 +63,7 @@
* A collection of utility methods involving CSS.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: CSSUtilities.java,v 1.9 2001/02/06 01:56:35 vhardy Exp $
+ * @version $Id: CSSUtilities.java,v 1.10 2001/02/06 09:30:46 tkormann Exp $
*/
public class CSSUtilities implements SVGConstants {
@@ -73,6 +73,22 @@
protected CSSUtilities() {}
/**
+ * Returns the View CSS associated to the specified element.
+ * @param e the element
+ */
+ public static ViewCSS getViewCSS(Element e) {
+ return (ViewCSS)((SVGOMDocument)e.getOwnerDocument()).getDefaultView();
+ }
+
+ /**
+ * Returns the computed style of the specified element.
+ * @param e the element
+ */
+ public static CSSStyleDeclaration getComputedStyle(Element e) {
+ return getViewCSS(e).getComputedStyle(e, null);
+ }
+
+ /**
* Partially computes the style in the use tree and set it in
* the target tree.
* Note: This method must be called only when 'def' has been added
@@ -81,17 +97,17 @@
public static void computeStyleAndURIs(Element use, ViewCSS uv,
Element def, ViewCSS dv, URL url) {
String href = XLinkSupport.getXLinkHref(def);
-
+
if (!href.equals("")) {
try {
XLinkSupport.setXLinkHref(def, new URL(url, href).toString());
} catch (MalformedURLException e) {
}
}
-
+
CSSOMReadOnlyStyleDeclaration usd;
AbstractViewCSS uview = (AbstractViewCSS)uv;
-
+
usd = (CSSOMReadOnlyStyleDeclaration)uview.computeStyle(use, null);
try {
updateURIs(usd, url);
@@ -99,7 +115,7 @@
e.printStackTrace();
}
((AbstractViewCSS)dv).setComputedStyle(def, null, usd);
-
+
for (Node un = use.getFirstChild(), dn = def.getFirstChild();
un != null;
un = un.getNextSibling(), dn = dn.getNextSibling()) {
@@ -108,7 +124,7 @@
}
}
}
-
+
/**
* Updates the URIs in the given style declaration.
*/
@@ -272,8 +288,7 @@
GraphicsNode gn,
BridgeContext ctx) {
- CSSStyleDeclaration decl
- = ctx.getViewCSS().getComputedStyle(clipedElement, null);
+ CSSStyleDeclaration decl = getComputedStyle(clipedElement);
CSSPrimitiveValue clipValue =
(CSSPrimitiveValue)decl.getPropertyCSSValue(CSS_CLIP_PATH_PROPERTY);
@@ -306,13 +321,10 @@
ClipBridge clipBridge = (ClipBridge)bridge;
SVGOMDocument doc =
(SVGOMDocument)clipPathElement.getOwnerDocument();
- ViewCSS v = ctx.getViewCSS();
- ctx.setViewCSS((ViewCSS)doc.getDefaultView());
Clip clip = clipBridge.createClip(ctx,
gn,
clipPathElement,
clipedElement);
- ctx.setViewCSS(v);
return clip;
default:
throw new Error(); // can't be reached
@@ -331,8 +343,7 @@
GraphicsNode gn,
BridgeContext ctx) {
- CSSStyleDeclaration decl
- = ctx.getViewCSS().getComputedStyle(maskedElement, null);
+ CSSStyleDeclaration decl = getComputedStyle(maskedElement);
CSSPrimitiveValue maskValue
= (CSSPrimitiveValue)decl.getPropertyCSSValue(CSS_MASK_PROPERTY);
@@ -364,13 +375,10 @@
}
MaskBridge maskBridge = (MaskBridge)bridge;
SVGOMDocument doc = (SVGOMDocument)maskElement.getOwnerDocument();
- ViewCSS v = ctx.getViewCSS();
- ctx.setViewCSS((ViewCSS)doc.getDefaultView());
Mask mask = maskBridge.createMask(gn,
ctx,
maskElement,
maskedElement);
- ctx.setViewCSS(v);
return mask;
default:
throw new Error(); // can't be reached
@@ -387,7 +395,7 @@
* @param decl the css style declaration
* @param uctx the UnitProcessor context
*/
- public static ShapePainter convertStrokeAndFill(Shape shape,
+ public static ShapePainter convertStrokeAndFill(Shape shape,
SVGElement svgElement,
GraphicsNode node,
BridgeContext ctx,
@@ -630,13 +638,10 @@
}
PaintBridge paintBridge = (PaintBridge)bridge;
SVGOMDocument doc = (SVGOMDocument)paintElement.getOwnerDocument();
- ViewCSS v = ctx.getViewCSS();
- ctx.setViewCSS((ViewCSS)doc.getDefaultView());
Paint paint = paintBridge.createStrokePaint(ctx,
node,
svgElement,
paintElement);
- ctx.setViewCSS(v);
return paint;
}
@@ -691,7 +696,7 @@
return null;
case CSSPrimitiveValue.CSS_URI:
return convertURIToMarker(v.getStringValue(),
- paintedElement,
+ paintedElement,
ctx, decl, uctx);
default:
throw new Error(); // can't be reached.
@@ -727,15 +732,11 @@
}
MarkerBridge markerBridge = (MarkerBridge)bridge;
- //SVGOMDocument doc = (SVGOMDocument)markerElement.getOwnerDocument();
- ViewCSS v = ctx.getViewCSS();
- // ctx.setViewCSS((ViewCSS)doc.getDefaultView());
- Marker marker = markerBridge.buildMarker(ctx,
+ Marker marker = markerBridge.buildMarker(ctx,
markerElement,
paintedElement);
- ctx.setViewCSS(v);
return marker;
-
+
}
/**
@@ -936,8 +937,7 @@
GraphicsNode node,
BridgeContext ctx){
- CSSStyleDeclaration decl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = getComputedStyle(element);
CSSPrimitiveValue filterValue
= (CSSPrimitiveValue)decl.getPropertyCSSValue(CSS_FILTER_PROPERTY);
@@ -967,8 +967,6 @@
}
FilterBridge filterBridge = (FilterBridge)bridge;
SVGOMDocument doc = (SVGOMDocument)filterElement.getOwnerDocument();
- ViewCSS v = ctx.getViewCSS();
- ctx.setViewCSS((ViewCSS)doc.getDefaultView());
Filter filter = filterBridge.create(node,
ctx,
filterElement,
@@ -976,7 +974,6 @@
null, // in
null, // filterRegion
null); // filterMap
- ctx.setViewCSS(v);
return filter;
default:
throw new Error(); // can't be reached
@@ -1008,8 +1005,7 @@
return in;
case SVGUtilities.FILL_PAINT: {
- CSSStyleDeclaration cssDecl;
- cssDecl = ctx.getViewCSS().getComputedStyle(filteredElement, null);
+ CSSStyleDeclaration cssDecl = getComputedStyle(filteredElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
Paint paint = convertFillToPaint((SVGElement)filteredElement,
@@ -1022,8 +1018,7 @@
}
case SVGUtilities.STROKE_PAINT: {
- CSSStyleDeclaration cssDecl;
- cssDecl = ctx.getViewCSS().getComputedStyle(filteredElement, null);
+ CSSStyleDeclaration cssDecl = getComputedStyle(filteredElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
Paint paint = convertStrokeToPaint((SVGElement)filteredElement,
1.6 +2 -2 xml-batik/sources/org/apache/batik/bridge/ConcreteGVTBuilder.java
Index: ConcreteGVTBuilder.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/ConcreteGVTBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ConcreteGVTBuilder.java 2001/02/05 13:06:11 1.5
+++ ConcreteGVTBuilder.java 2001/02/06 09:30:47 1.6
@@ -48,7 +48,7 @@
* @author <a href="mailto:etissandier@ilog.fr">Emmanuel Tissandier</a>
* @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: ConcreteGVTBuilder.java,v 1.5 2001/02/05 13:06:11 tkormann Exp $
+ * @version $Id: ConcreteGVTBuilder.java,v 1.6 2001/02/06 09:30:47 tkormann Exp $
*/
public class ConcreteGVTBuilder implements GVTBuilder, SVGConstants {
/**
@@ -57,7 +57,7 @@
* @param svgDocument the DOM tree that represents an SVG document
*/
public GraphicsNode build(BridgeContext ctx, Document svgDocument){
- ctx.initialize((SVGDocument)svgDocument, this);
+ ctx.initialize(this);
RootGraphicsNode root = new RootGraphicsNode();
Element svgRoot = svgDocument.getDocumentElement();
1.4 +3 -5 xml-batik/sources/org/apache/batik/bridge/SVGAElementBridge.java
Index: SVGAElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGAElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGAElementBridge.java 2001/02/01 13:45:46 1.3
+++ SVGAElementBridge.java 2001/02/06 09:30:48 1.4
@@ -49,7 +49,7 @@
* A factory for the <a> SVG element.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SVGAElementBridge.java,v 1.3 2001/02/01 13:45:46 tkormann Exp $
+ * @version $Id: SVGAElementBridge.java,v 1.4 2001/02/06 09:30:48 tkormann Exp $
*/
public class SVGAElementBridge implements GraphicsNodeBridge, SVGConstants {
@@ -63,8 +63,7 @@
SVGUtilities.convertAffineTransform(element, ATTR_TRANSFORM);
gn.setTransform(at);
- CSSStyleDeclaration decl;
- decl = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, decl);
@@ -81,8 +80,7 @@
public void buildGraphicsNode(GraphicsNode gn,
BridgeContext ctx,
Element element) {
- CSSStyleDeclaration decl;
- decl = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
CSSPrimitiveValue val =
(CSSPrimitiveValue)decl.getPropertyCSSValue(ATTR_OPACITY);
Composite composite = CSSUtilities.convertOpacityToComposite(val);
1.5 +3 -5 xml-batik/sources/org/apache/batik/bridge/SVGClipPathElementBridge.java
Index: SVGClipPathElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGClipPathElementBridge.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGClipPathElementBridge.java 2001/02/05 10:55:54 1.4
+++ SVGClipPathElementBridge.java 2001/02/06 09:30:48 1.5
@@ -33,7 +33,7 @@
* A factory for the <clipPath> SVG element.
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGClipPathElementBridge.java,v 1.4 2001/02/05 10:55:54 tkormann Exp $
+ * @version $Id: SVGClipPathElementBridge.java,v 1.5 2001/02/06 09:30:48 tkormann Exp $
*/
public class SVGClipPathElementBridge implements ClipBridge, SVGConstants {
@@ -46,8 +46,7 @@
Element clipElement,
Element clippedElement) {
- CSSStyleDeclaration decl
- = ctx.getViewCSS().getComputedStyle(clipElement, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(clipElement);
// Build the GVT tree that represents the clip path
//
@@ -109,8 +108,7 @@
}
hasChildren = true;
// compute the outline of the current Element
- CSSStyleDeclaration c =
- ctx.getViewCSS().getComputedStyle(child, null);
+ CSSStyleDeclaration c = CSSUtilities.getComputedStyle(child);
CSSPrimitiveValue v = (CSSPrimitiveValue)c.getPropertyCSSValue
(CSS_CLIP_RULE_PROPERTY);
int wr = (CSSUtilities.rule(v) == CSSUtilities.RULE_NONZERO)
1.4 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeBlendElementBridge.java
Index: SVGFeBlendElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeBlendElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGFeBlendElementBridge.java 2001/01/24 19:49:23 1.3
+++ SVGFeBlendElementBridge.java 2001/02/06 09:30:49 1.4
@@ -43,7 +43,7 @@
*
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeBlendElementBridge.java,v 1.3 2001/01/24 19:49:23 deweese Exp $
+ * @version $Id: SVGFeBlendElementBridge.java,v 1.4 2001/02/06 09:30:49 tkormann Exp $
*/
public class SVGFeBlendElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -73,7 +73,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Extract Blend operation
@@ -121,7 +121,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +4 -4 xml-batik/sources/org/apache/batik/bridge/SVGFeColorMatrixElementBridge.java
Index: SVGFeColorMatrixElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeColorMatrixElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeColorMatrixElementBridge.java 2001/01/24 05:39:11 1.2
+++ SVGFeColorMatrixElementBridge.java 2001/02/06 09:30:49 1.3
@@ -43,7 +43,7 @@
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeColorMatrixElementBridge.java,v 1.2 2001/01/24 05:39:11 vhardy Exp $
+ * @version $Id: SVGFeColorMatrixElementBridge.java,v 1.3 2001/02/06 09:30:49 tkormann Exp $
*/
public class SVGFeColorMatrixElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -74,7 +74,7 @@
Filter filter = null;
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// First, extract source
@@ -104,8 +104,8 @@
defaultRegion = filterRegion;
}
- CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ CSSStyleDeclaration cssDecl =
+ CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeComponentTransferElementBridge.java
Index: SVGFeComponentTransferElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeComponentTransferElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeComponentTransferElementBridge.java 2001/01/24 05:39:11 1.2
+++ SVGFeComponentTransferElementBridge.java 2001/02/06 09:30:50 1.3
@@ -46,7 +46,7 @@
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeComponentTransferElementBridge.java,v 1.2 2001/01/24 05:39:11 vhardy Exp $
+ * @version $Id: SVGFeComponentTransferElementBridge.java,v 1.3 2001/02/06 09:30:50 tkormann Exp $
*/
public class SVGFeComponentTransferElementBridge
implements FilterPrimitiveBridge, SVGConstants {
@@ -76,7 +76,7 @@
Map filterMap){
Filter filter = null;
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// First, extract source
@@ -107,7 +107,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.4 +4 -4 xml-batik/sources/org/apache/batik/bridge/SVGFeCompositeElementBridge.java
Index: SVGFeCompositeElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeCompositeElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGFeCompositeElementBridge.java 2001/01/24 19:49:24 1.3
+++ SVGFeCompositeElementBridge.java 2001/02/06 09:30:50 1.4
@@ -43,7 +43,7 @@
*
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeCompositeElementBridge.java,v 1.3 2001/01/24 19:49:24 deweese Exp $
+ * @version $Id: SVGFeCompositeElementBridge.java,v 1.4 2001/02/06 09:30:50 tkormann Exp $
*/
public class SVGFeCompositeElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -73,7 +73,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Extract Composite operation
@@ -120,8 +120,8 @@
defaultRegion = filterRegion;
}
- CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ CSSStyleDeclaration cssDecl =
+ CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +5 -5 xml-batik/sources/org/apache/batik/bridge/SVGFeConvolveMatrixElementBridge.java
Index: SVGFeConvolveMatrixElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeConvolveMatrixElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeConvolveMatrixElementBridge.java 2001/01/24 05:39:12 1.2
+++ SVGFeConvolveMatrixElementBridge.java 2001/02/06 09:30:51 1.3
@@ -44,7 +44,7 @@
* <tt>ConvolveMatrixRable</tt>
*
* @author <a href="mailto:Thomas.DeWeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id: SVGFeConvolveMatrixElementBridge.java,v 1.2 2001/01/24 05:39:12 vhardy Exp $
+ * @version $Id: SVGFeConvolveMatrixElementBridge.java,v 1.3 2001/02/06 09:30:51 tkormann Exp $
*/
public class SVGFeConvolveMatrixElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -141,7 +141,7 @@
divisor += kernel[i];
if (divisor == 0.0f) divisor = 1.0f;
}
- if (divisor == 0.0f)
+ if (divisor == 0.0f)
throw new IllegalAttributeValueException
(Messages.formatMessage
("feConvolveMatrix.divisor.zero", null));
@@ -263,12 +263,12 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
Rectangle2D convolveArea
= SVGUtilities.convertFilterPrimitiveRegion(filterElement,
@@ -305,7 +305,7 @@
// for (int i=0; i<kernel.length; i++)
// System.out.print(kernel[i] + ", ");
// System.out.println("");
-
+
convolve.setKernel(new Kernel(orderX, orderY, kernel));
convolve.setTarget(new Point(targetX, targetY));
convolve.setBias(bias);
1.3 +8 -8 xml-batik/sources/org/apache/batik/bridge/SVGFeDiffuseLightingElementBridge.java
Index: SVGFeDiffuseLightingElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeDiffuseLightingElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeDiffuseLightingElementBridge.java 2001/01/24 05:39:12 1.2
+++ SVGFeDiffuseLightingElementBridge.java 2001/02/06 09:30:51 1.3
@@ -46,7 +46,7 @@
* a concrete <tt>Filter</tt> filter implementation
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGFeDiffuseLightingElementBridge.java,v 1.2 2001/01/24 05:39:12 vhardy Exp $
+ * @version $Id: SVGFeDiffuseLightingElementBridge.java,v 1.3 2001/02/06 09:30:51 tkormann Exp $
*/
public class SVGFeDiffuseLightingElementBridge
implements FilterPrimitiveBridge, SVGConstants {
@@ -76,7 +76,7 @@
Map filterMap){
Filter filter = null;
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// First, extract source
@@ -107,7 +107,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
@@ -135,7 +135,7 @@
}
Node lightNode = children.item(0);
- if((lightNode == null) ||
+ if((lightNode == null) ||
!(lightNode.getNodeType() == Node.ELEMENT_NODE)){
throw new IllegalAttributeValueException(
Messages.formatMessage("feDiffuseLighting.child.missing",
@@ -148,15 +148,15 @@
String kdStr =
filterElement.getAttributeNS(null, SVG_DIFFUSE_CONSTANT_ATTRIBUTE);
- double kd =
+ double kd =
SVGUtilities.convertSVGNumber(SVG_DIFFUSE_CONSTANT_ATTRIBUTE, kdStr);
-
+
// Extract surface scale
String surfaceScaleStr =
filterElement.getAttributeNS(null, SVG_SURFACE_SCALE_ATTRIBUTE);
- double surfaceScale =
- SVGUtilities.convertSVGNumber(SVG_SURFACE_SCALE_ATTRIBUTE,
+ double surfaceScale =
+ SVGUtilities.convertSVGNumber(SVG_SURFACE_SCALE_ATTRIBUTE,
surfaceScaleStr);
filter = new DiffuseLightingRable8Bit(in,
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeDisplacementMapElementBridge.java
Index: SVGFeDisplacementMapElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeDisplacementMapElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeDisplacementMapElementBridge.java 2001/01/24 05:39:12 1.2
+++ SVGFeDisplacementMapElementBridge.java 2001/02/06 09:30:51 1.3
@@ -44,7 +44,7 @@
*
* @author <a href="mailto:sheng.pei@eng.sun.com">Sheng Pei</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeDisplacementMapElementBridge.java,v 1.2 2001/01/24 05:39:12 vhardy Exp $
+ * @version $Id: SVGFeDisplacementMapElementBridge.java,v 1.3 2001/02/06 09:30:51 tkormann Exp $
*/
public class SVGFeDisplacementMapElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -72,7 +72,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
//
@@ -140,7 +140,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +4 -4 xml-batik/sources/org/apache/batik/bridge/SVGFeFloodElementBridge.java
Index: SVGFeFloodElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeFloodElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeFloodElementBridge.java 2001/01/24 05:39:13 1.2
+++ SVGFeFloodElementBridge.java 2001/02/06 09:30:52 1.3
@@ -48,7 +48,7 @@
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeFloodElementBridge.java,v 1.2 2001/01/24 05:39:13 vhardy Exp $
+ * @version $Id: SVGFeFloodElementBridge.java,v 1.3 2001/02/06 09:30:52 tkormann Exp $
*/
public class SVGFeFloodElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -77,17 +77,17 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Extract flood color
CSSStyleDeclaration decl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
Color floodColor = CSSUtilities.convertFloodColorToPaint(decl);
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeGaussianBlurElementBridge.java
Index: SVGFeGaussianBlurElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeGaussianBlurElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeGaussianBlurElementBridge.java 2001/01/24 05:39:13 1.2
+++ SVGFeGaussianBlurElementBridge.java 2001/02/06 09:30:52 1.3
@@ -40,7 +40,7 @@
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeGaussianBlurElementBridge.java,v 1.2 2001/01/24 05:39:13 vhardy Exp $
+ * @version $Id: SVGFeGaussianBlurElementBridge.java,v 1.3 2001/02/06 09:30:52 tkormann Exp $
*/
public class SVGFeGaussianBlurElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -68,7 +68,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Extract standard deviation
@@ -135,7 +135,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +2 -2 xml-batik/sources/org/apache/batik/bridge/SVGFeImageElementBridge.java
Index: SVGFeImageElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeImageElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeImageElementBridge.java 2001/01/24 05:39:13 1.2
+++ SVGFeImageElementBridge.java 2001/02/06 09:30:53 1.3
@@ -84,7 +84,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
SVGElement svgElement = (SVGElement) filterElement;
@@ -101,7 +101,7 @@
Rectangle2D defaultRegion = filterRegion;
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.5 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeMergeElementBridge.java
Index: SVGFeMergeElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeMergeElementBridge.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGFeMergeElementBridge.java 2001/01/26 22:24:38 1.4
+++ SVGFeMergeElementBridge.java 2001/02/06 09:30:53 1.5
@@ -43,7 +43,7 @@
*
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeMergeElementBridge.java,v 1.4 2001/01/26 22:24:38 vhardy Exp $
+ * @version $Id: SVGFeMergeElementBridge.java,v 1.5 2001/02/06 09:30:53 tkormann Exp $
*/
public class SVGFeMergeElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -72,7 +72,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Extract sources, they are defined in the filterElement's children.
@@ -124,7 +124,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeMorphologyElementBridge.java
Index: SVGFeMorphologyElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeMorphologyElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeMorphologyElementBridge.java 2001/01/24 05:39:13 1.2
+++ SVGFeMorphologyElementBridge.java 2001/02/06 09:30:53 1.3
@@ -40,7 +40,7 @@
*
* @author <a href="mailto:sheng.pei@eng.sun.com">Sheng Pei</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeMorphologyElementBridge.java,v 1.2 2001/01/24 05:39:13 vhardy Exp $
+ * @version $Id: SVGFeMorphologyElementBridge.java,v 1.3 2001/02/06 09:30:53 tkormann Exp $
*/
public class SVGFeMorphologyElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -69,7 +69,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Extract the radius (or radii) for the operation.
@@ -148,7 +148,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeOffsetElementBridge.java
Index: SVGFeOffsetElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeOffsetElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeOffsetElementBridge.java 2001/01/24 05:39:14 1.2
+++ SVGFeOffsetElementBridge.java 2001/02/06 09:30:54 1.3
@@ -50,7 +50,7 @@
*
* @author <a href="mailto:dean@w3.org">Dean Jackson</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeOffsetElementBridge.java,v 1.2 2001/01/24 05:39:14 vhardy Exp $
+ * @version $Id: SVGFeOffsetElementBridge.java,v 1.3 2001/02/06 09:30:54 tkormann Exp $
*/
public class SVGFeOffsetElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -79,7 +79,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// parse the dx attribute
@@ -126,7 +126,7 @@
}
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +9 -9 xml-batik/sources/org/apache/batik/bridge/SVGFeSpecularLightingElementBridge.java
Index: SVGFeSpecularLightingElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeSpecularLightingElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeSpecularLightingElementBridge.java 2001/01/24 05:39:14 1.2
+++ SVGFeSpecularLightingElementBridge.java 2001/02/06 09:30:54 1.3
@@ -46,7 +46,7 @@
* a concrete <tt>Filter</tt> filter implementation
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGFeSpecularLightingElementBridge.java,v 1.2 2001/01/24 05:39:14 vhardy Exp $
+ * @version $Id: SVGFeSpecularLightingElementBridge.java,v 1.3 2001/02/06 09:30:54 tkormann Exp $
*/
public class SVGFeSpecularLightingElementBridge
implements FilterPrimitiveBridge, SVGConstants {
@@ -76,7 +76,7 @@
Map filterMap){
Filter filter = null;
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// First, extract source
@@ -106,8 +106,8 @@
defaultRegion = filterRegion;
}
- CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ CSSStyleDeclaration cssDecl =
+ CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
@@ -135,7 +135,7 @@
}
Node lightNode = children.item(0);
- if((lightNode == null) ||
+ if((lightNode == null) ||
!(lightNode.getNodeType() == Node.ELEMENT_NODE)){
throw new IllegalAttributeValueException(
Messages.formatMessage("feSpecularLighting.child.missing",
@@ -148,9 +148,9 @@
String ksStr =
filterElement.getAttributeNS(null, SVG_SPECULAR_CONSTANT_ATTRIBUTE);
- double ks =
+ double ks =
SVGUtilities.convertSVGNumber(SVG_SPECULAR_CONSTANT_ATTRIBUTE, ksStr);
-
+
// Extract specular exponent
String nsStr =
filterElement.getAttributeNS(null, SVG_SPECULAR_EXPONENT_ATTRIBUTE);
@@ -162,8 +162,8 @@
String surfaceScaleStr =
filterElement.getAttributeNS(null, SVG_SURFACE_SCALE_ATTRIBUTE);
- double surfaceScale =
- SVGUtilities.convertSVGNumber(SVG_SURFACE_SCALE_ATTRIBUTE,
+ double surfaceScale =
+ SVGUtilities.convertSVGNumber(SVG_SURFACE_SCALE_ATTRIBUTE,
surfaceScaleStr);
filter = new SpecularLightingRable8Bit(in,
1.4 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeTileElementBridge.java
Index: SVGFeTileElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeTileElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGFeTileElementBridge.java 2001/02/01 16:41:50 1.3
+++ SVGFeTileElementBridge.java 2001/02/06 09:30:54 1.4
@@ -35,7 +35,7 @@
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeTileElementBridge.java,v 1.3 2001/02/01 16:41:50 vhardy Exp $
+ * @version $Id: SVGFeTileElementBridge.java,v 1.4 2001/02/06 09:30:54 tkormann Exp $
*/
public class SVGFeTileElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -64,14 +64,14 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
//
// Tile region is defined by the filter region
//
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFeTurbulenceElementBridge.java
Index: SVGFeTurbulenceElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFeTurbulenceElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFeTurbulenceElementBridge.java 2001/01/24 05:39:14 1.2
+++ SVGFeTurbulenceElementBridge.java 2001/02/06 09:30:55 1.3
@@ -44,7 +44,7 @@
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGFeTurbulenceElementBridge.java,v 1.2 2001/01/24 05:39:14 vhardy Exp $
+ * @version $Id: SVGFeTurbulenceElementBridge.java,v 1.3 2001/02/06 09:30:55 tkormann Exp $
*/
public class SVGFeTurbulenceElementBridge implements FilterPrimitiveBridge,
SVGConstants {
@@ -72,7 +72,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// parse the baseFrequency attribute
@@ -149,7 +149,7 @@
Rectangle2D defaultRegion = filterRegion;
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.3 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGFilterElementBridge.java
Index: SVGFilterElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGFilterElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGFilterElementBridge.java 2001/01/24 05:39:15 1.2
+++ SVGFilterElementBridge.java 2001/02/06 09:30:55 1.3
@@ -44,7 +44,7 @@
* <tt>Filter</tt>.
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGFilterElementBridge.java,v 1.2 2001/01/24 05:39:15 vhardy Exp $
+ * @version $Id: SVGFilterElementBridge.java,v 1.3 2001/02/06 09:30:55 tkormann Exp $
*/
public class SVGFilterElementBridge implements FilterBridge, SVGConstants {
@@ -71,7 +71,7 @@
Rectangle2D filterRegion,
Map filterMap){
- GraphicsNodeRenderContext rc =
+ GraphicsNodeRenderContext rc =
bridgeContext.getGraphicsNodeRenderContext();
// Make the initial source as a RenderableImage
@@ -83,7 +83,7 @@
// Get the filter region and resolution
CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(filterElement, null);
+ = CSSUtilities.getComputedStyle(filterElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.4 +3 -5 xml-batik/sources/org/apache/batik/bridge/SVGGElementBridge.java
Index: SVGGElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGGElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGGElementBridge.java 2001/02/01 13:45:46 1.3
+++ SVGGElementBridge.java 2001/02/06 09:30:55 1.4
@@ -42,7 +42,7 @@
* A factory for the <g> SVG element.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SVGGElementBridge.java,v 1.3 2001/02/01 13:45:46 tkormann Exp $
+ * @version $Id: SVGGElementBridge.java,v 1.4 2001/02/06 09:30:55 tkormann Exp $
*/
public class SVGGElementBridge implements GraphicsNodeBridge, SVGConstants {
@@ -56,8 +56,7 @@
SVGUtilities.convertAffineTransform(element, ATTR_TRANSFORM);
gn.setTransform(at);
- CSSStyleDeclaration decl;
- decl = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, decl);
@@ -75,8 +74,7 @@
public void buildGraphicsNode(GraphicsNode node,
BridgeContext ctx,
Element element) {
- CSSStyleDeclaration decl;
- decl = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
CSSPrimitiveValue val =
(CSSPrimitiveValue)decl.getPropertyCSSValue(ATTR_OPACITY);
Composite composite = CSSUtilities.convertOpacityToComposite(val);
1.2 +2 -3 xml-batik/sources/org/apache/batik/bridge/SVGGradientBridge.java
Index: SVGGradientBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGGradientBridge.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SVGGradientBridge.java 2001/01/23 17:06:34 1.1
+++ SVGGradientBridge.java 2001/02/06 09:30:56 1.2
@@ -33,7 +33,7 @@
* Base class for SVGLinearGradientBridge and SVGRadialGradientBridge
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGGradientBridge.java,v 1.1 2001/01/23 17:06:34 tkormann Exp $
+ * @version $Id: SVGGradientBridge.java,v 1.2 2001/02/06 09:30:56 tkormann Exp $
*/
public abstract class SVGGradientBridge implements SVGConstants {
@@ -81,8 +81,7 @@
}
float ratio = CSSUtilities.convertRatio(offsetStr);
// parse the stop-color CSS properties
- CSSStyleDeclaration decl =
- ctx.getViewCSS().getComputedStyle(stop, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(stop);
Color stopColor = CSSUtilities.convertStopColorToPaint(decl);
return new GradientStop(stopColor, ratio);
1.5 +5 -12 xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java
Index: SVGImageElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGImageElementBridge.java 2001/02/05 10:55:54 1.4
+++ SVGImageElementBridge.java 2001/02/06 09:30:56 1.5
@@ -61,7 +61,7 @@
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
- * @version $Id: SVGImageElementBridge.java,v 1.4 2001/02/05 10:55:54 tkormann Exp $
+ * @version $Id: SVGImageElementBridge.java,v 1.5 2001/02/06 09:30:56 tkormann Exp $
*/
public class SVGImageElementBridge implements GraphicsNodeBridge,
SVGConstants {
@@ -71,8 +71,7 @@
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element element){
SVGElement svgElement = (SVGElement) element;
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
String uriStr = XLinkSupport.getXLinkHref(svgElement);
// nothing referenced.
@@ -133,8 +132,7 @@
public void buildGraphicsNode(GraphicsNode node,
BridgeContext ctx,
Element element) {
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
// Set node composite
CSSPrimitiveValue val
@@ -185,16 +183,13 @@
SVGDocument imgDocument) {
Viewport oldViewport = ctx.getViewport();
- ViewCSS oldViewCSS = ctx.getViewCSS();
ctx.setViewport(null);
- ctx.setViewCSS((ViewCSS)((SVGOMDocument)imgDocument).getDefaultView());
SVGSVGElement svgElement = imgDocument.getRootElement();
CompositeGraphicsNode result = new CompositeGraphicsNode();
- CSSStyleDeclaration decl;
- decl = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, decl);
@@ -236,15 +231,13 @@
// restore viewport and current CSS view
ctx.setViewport(oldViewport);
- ctx.setViewCSS(oldViewCSS);
return result;
}
protected Rectangle2D getImageBounds(BridgeContext ctx,
SVGElement svgElement) {
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(svgElement, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(svgElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
1.3 +2 -2 xml-batik/sources/org/apache/batik/bridge/SVGLinearGradientBridge.java
Index: SVGLinearGradientBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGLinearGradientBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGLinearGradientBridge.java 2001/02/01 13:45:46 1.2
+++ SVGLinearGradientBridge.java 2001/02/06 09:30:56 1.3
@@ -36,7 +36,7 @@
* a <tt>LinearGradientPaint</tt>
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGLinearGradientBridge.java,v 1.2 2001/02/01 13:45:46 tkormann Exp $
+ * @version $Id: SVGLinearGradientBridge.java,v 1.3 2001/02/06 09:30:56 tkormann Exp $
*/
public class SVGLinearGradientBridge extends SVGGradientBridge
implements PaintBridge {
@@ -83,7 +83,7 @@
// Get unit processor to compute gradient control points
//
CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(paintElement, null);
+ = CSSUtilities.getComputedStyle(paintElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
1.3 +18 -18 xml-batik/sources/org/apache/batik/bridge/SVGMarkerElementBridge.java
Index: SVGMarkerElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGMarkerElementBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGMarkerElementBridge.java 2001/02/05 07:48:40 1.2
+++ SVGMarkerElementBridge.java 2001/02/06 09:30:57 1.3
@@ -40,7 +40,7 @@
* Turns a marker element into a <tt>Marker</tt> object
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGMarkerElementBridge.java,v 1.2 2001/02/05 07:48:40 hillion Exp $
+ * @version $Id: SVGMarkerElementBridge.java,v 1.3 2001/02/06 09:30:57 tkormann Exp $
*/
public class SVGMarkerElementBridge implements MarkerBridge {
/**
@@ -71,27 +71,27 @@
(CSSOMReadOnlyStyleDeclaration)viewCSS.getComputedStyle(g, null);
gsd.setPropertyCSSValue
- (CSS_MARKER_PROPERTY,
+ (CSS_MARKER_PROPERTY,
new CSSOMReadOnlyValue(ValueConstants.NONE_VALUE),
gsd.getLocalPropertyPriority(CSS_MARKER_PROPERTY),
gsd.getLocalPropertyOrigin(CSS_MARKER_PROPERTY));
gsd.setPropertyCSSValue
- (CSS_MARKER_START_PROPERTY,
+ (CSS_MARKER_START_PROPERTY,
new CSSOMReadOnlyValue(ValueConstants.NONE_VALUE),
gsd.getLocalPropertyPriority(CSS_MARKER_START_PROPERTY),
gsd.getLocalPropertyOrigin(CSS_MARKER_START_PROPERTY));
gsd.setPropertyCSSValue
- (CSS_MARKER_MID_PROPERTY,
+ (CSS_MARKER_MID_PROPERTY,
new CSSOMReadOnlyValue(ValueConstants.NONE_VALUE),
gsd.getLocalPropertyPriority(CSS_MARKER_START_PROPERTY),
gsd.getLocalPropertyOrigin(CSS_MARKER_START_PROPERTY));
gsd.setPropertyCSSValue
- (CSS_MARKER_END_PROPERTY,
+ (CSS_MARKER_END_PROPERTY,
new CSSOMReadOnlyValue(ValueConstants.NONE_VALUE),
gsd.getLocalPropertyPriority(CSS_MARKER_START_PROPERTY),
gsd.getLocalPropertyOrigin(CSS_MARKER_START_PROPERTY));
-
+
g.appendChild(inst);
if (md != pd) {
@@ -159,7 +159,7 @@
SVG_REFY_ATTRIBUTE, s,
uctx,
UnitProcessor.VERTICAL_LENGTH);
-
+
// Extract the Marker's width/height
s = inst.getAttributeNS(null, SVG_MARKER_WIDTH_ATTRIBUTE);
float markerWidth = 0;
@@ -221,11 +221,11 @@
orient = Double.NaN;
}
else{
- orient =
+ orient =
SVGUtilities.convertSVGNumber(SVG_ORIENT_ATTRIBUTE, s);
}
- // Extract the overflow property
+ // Extract the overflow property
CSSPrimitiveValue vbOverflow =
(CSSPrimitiveValue)cssDecl.getPropertyCSSValue(CSS_OVERFLOW_PROPERTY);
@@ -272,8 +272,8 @@
float strokeWidth = 1;
if(markerUnits.equals(SVG_STROKE_WIDTH_VALUE)){
CSSStyleDeclaration cssDeclPainted
- = ctx.getViewCSS().getComputedStyle(paintedElement, null);
-
+ = CSSUtilities.getComputedStyle(paintedElement);
+
UnitProcessor.Context uctxPainted
= new DefaultUnitProcessorContext(ctx,
cssDeclPainted);
@@ -295,22 +295,22 @@
if(preserveAspectRatioTransform != null){
markerTxf.concatenate(preserveAspectRatioTransform);
}
-
+
markerContentNode.setTransform(markerTxf);
//
- // Set the markerContentNode's clipping area
+ // Set the markerContentNode's clipping area
// depending on the overflow property
//
if(overflow == false){
- Rectangle2D markerClip
+ Rectangle2D markerClip
= new Rectangle2D.Float(0, 0, strokeWidth*markerWidth,
strokeWidth*markerHeight);
-
+
CompositeGraphicsNode newMarkerContentNode
= new CompositeGraphicsNode();
-
+
newMarkerContentNode.getChildren().add(markerContentNode);
GraphicsNodeRenderContext rc =
@@ -318,7 +318,7 @@
Filter clipSrc = new GraphicsNodeRable8Bit
(newMarkerContentNode, rc);
-
+
newMarkerContentNode.setClip
(new ClipRable8Bit(clipSrc, markerClip));
@@ -331,7 +331,7 @@
//
//
- // Watch out: the reference point is defined a little weirdly in the
+ // Watch out: the reference point is defined a little weirdly in the
// SVG spec., but the bottom line is that the marker content should
// not be translated. Rather, the reference point should be computed
// in viewport space (this is what the following transform
1.5 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGMaskElementBridge.java
Index: SVGMaskElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGMaskElementBridge.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGMaskElementBridge.java 2001/02/05 10:55:54 1.4
+++ SVGMaskElementBridge.java 2001/02/06 09:30:57 1.5
@@ -46,7 +46,7 @@
*
* @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
- * @version $Id: SVGMaskElementBridge.java,v 1.4 2001/02/05 10:55:54 tkormann Exp $
+ * @version $Id: SVGMaskElementBridge.java,v 1.5 2001/02/06 09:30:57 tkormann Exp $
*/
public class SVGMaskElementBridge implements MaskBridge, SVGConstants {
@@ -65,8 +65,8 @@
//
// Get the mask region
//
- CSSStyleDeclaration cssDecl
- = bridgeContext.getViewCSS().getComputedStyle(maskElement, null);
+ CSSStyleDeclaration cssDecl =
+ CSSUtilities.getComputedStyle(maskElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(bridgeContext, cssDecl);
1.6 +3 -3 xml-batik/sources/org/apache/batik/bridge/SVGPatternElementBridge.java
Index: SVGPatternElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGPatternElementBridge.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SVGPatternElementBridge.java 2001/02/05 10:55:55 1.5
+++ SVGPatternElementBridge.java 2001/02/06 09:30:58 1.6
@@ -34,7 +34,7 @@
* a <tt>PatternPaint</tt>
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGPatternElementBridge.java,v 1.5 2001/02/05 10:55:55 tkormann Exp $
+ * @version $Id: SVGPatternElementBridge.java,v 1.6 2001/02/06 09:30:58 tkormann Exp $
*/
public class SVGPatternElementBridge implements PaintBridge, SVGConstants {
@@ -141,7 +141,7 @@
// Get the overflow property on the pattern element
CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(paintElement, null);
+ = CSSUtilities.getComputedStyle(paintElement);
CSSPrimitiveValue vbOverflow =
(CSSPrimitiveValue)cssDecl.getPropertyCSSValue(CSS_OVERFLOW_PROPERTY);
@@ -159,7 +159,7 @@
// Get pattern region. This is from the paintedElement, as
// percentages are from the referencing element.
CSSStyleDeclaration cssDeclPainted
- = ctx.getViewCSS().getComputedStyle(paintedElement, null);
+ = CSSUtilities.getComputedStyle(paintedElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
1.3 +2 -2 xml-batik/sources/org/apache/batik/bridge/SVGRadialGradientBridge.java
Index: SVGRadialGradientBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGRadialGradientBridge.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGRadialGradientBridge.java 2001/02/01 13:45:46 1.2
+++ SVGRadialGradientBridge.java 2001/02/06 09:30:58 1.3
@@ -37,7 +37,7 @@
* a <tt>RadialGradientPaint</tt>
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
- * @version $Id: SVGRadialGradientBridge.java,v 1.2 2001/02/01 13:45:46 tkormann Exp $
+ * @version $Id: SVGRadialGradientBridge.java,v 1.3 2001/02/06 09:30:58 tkormann Exp $
*/
public class SVGRadialGradientBridge extends SVGGradientBridge
implements PaintBridge {
@@ -84,7 +84,7 @@
// Get unit processor to compute gradient control points
//
CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(paintElement, null);
+ = CSSUtilities.getComputedStyle(paintElement);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
1.5 +2 -3 xml-batik/sources/org/apache/batik/bridge/SVGSVGElementBridge.java
Index: SVGSVGElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGSVGElementBridge.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGSVGElementBridge.java 2001/02/05 10:55:55 1.4
+++ SVGSVGElementBridge.java 2001/02/06 09:30:58 1.5
@@ -37,15 +37,14 @@
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SVGSVGElementBridge.java,v 1.4 2001/02/05 10:55:55 tkormann Exp $
+ * @version $Id: SVGSVGElementBridge.java,v 1.5 2001/02/06 09:30:58 tkormann Exp $
*/
public class SVGSVGElementBridge implements GraphicsNodeBridge, SVGConstants {
public GraphicsNode createGraphicsNode(BridgeContext ctx,
Element element){
SVGSVGElement svgElement = (SVGSVGElement) element;
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx,
cssDecl);
1.5 +3 -5 xml-batik/sources/org/apache/batik/bridge/SVGShapeElementBridge.java
Index: SVGShapeElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGShapeElementBridge.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SVGShapeElementBridge.java 2001/02/06 01:56:36 1.4
+++ SVGShapeElementBridge.java 2001/02/06 09:30:59 1.5
@@ -41,15 +41,14 @@
*
* @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
* @author <a href="mailto:cjolif@ilog.fr">Christophe Jolif</a>
- * @version $Id: SVGShapeElementBridge.java,v 1.4 2001/02/06 01:56:36 vhardy Exp $
+ * @version $Id: SVGShapeElementBridge.java,v 1.5 2001/02/06 09:30:59 tkormann Exp $
*/
public abstract class SVGShapeElementBridge implements GraphicsNodeBridge,
SVGConstants {
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element element){
SVGElement svgElement = (SVGElement) element;
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx,
cssDecl);
@@ -70,8 +69,7 @@
ShapeNode node = (ShapeNode)gn;
SVGElement svgElement = (SVGElement) element;
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx,
cssDecl);
1.4 +3 -5 xml-batik/sources/org/apache/batik/bridge/SVGSwitchElementBridge.java
Index: SVGSwitchElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGSwitchElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGSwitchElementBridge.java 2001/02/01 13:45:46 1.3
+++ SVGSwitchElementBridge.java 2001/02/06 09:30:59 1.4
@@ -41,7 +41,7 @@
* A factory for the <switch> SVG element.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SVGSwitchElementBridge.java,v 1.3 2001/02/01 13:45:46 tkormann Exp $
+ * @version $Id: SVGSwitchElementBridge.java,v 1.4 2001/02/06 09:30:59 tkormann Exp $
*/
public class SVGSwitchElementBridge
implements GraphicsNodeBridge,
@@ -56,8 +56,7 @@
gn.setTransform(at);
- CSSStyleDeclaration decl;
- decl = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, decl);
@@ -76,8 +75,7 @@
Element element) {
Document document = element.getOwnerDocument();
- ViewCSS viewCSS = (ViewCSS) ((DocumentView) document).getDefaultView();
- CSSStyleDeclaration decl = viewCSS.getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
CSSPrimitiveValue val =
(CSSPrimitiveValue)decl.getPropertyCSSValue(ATTR_OPACITY);
Composite composite = CSSUtilities.convertOpacityToComposite(val);
1.10 +7 -11 xml-batik/sources/org/apache/batik/bridge/SVGTextElementBridge.java
Index: SVGTextElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGTextElementBridge.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SVGTextElementBridge.java 2001/02/05 11:59:40 1.9
+++ SVGTextElementBridge.java 2001/02/06 09:30:59 1.10
@@ -66,7 +66,7 @@
* A factory for the <text> SVG element.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SVGTextElementBridge.java,v 1.9 2001/02/05 11:59:40 billh Exp $
+ * @version $Id: SVGTextElementBridge.java,v 1.10 2001/02/06 09:30:59 tkormann Exp $
*/
public class SVGTextElementBridge implements GraphicsNodeBridge, SVGConstants {
protected final static Map fonts = new HashMap(11);
@@ -113,8 +113,7 @@
RenderingHints.VALUE_ANTIALIAS_ON);
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
@@ -154,8 +153,7 @@
TextNode result = (TextNode)node;
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
@@ -506,8 +504,7 @@
BridgeContext ctx,
Element element) {
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
@@ -616,8 +613,7 @@
Element element,
GraphicsNode node) {
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx, cssDecl);
@@ -752,7 +748,7 @@
result.put(GVTAttributedCharacterIterator.TextAttribute.BASELINE_SHIFT,
new Float(f*fs/100f));
} else {
- // TODO
+ // TODO
t = v.getPrimitiveType();
f = UnitProcessor.cssToUserSpace(t,
v.getFloatValue(t),
@@ -800,7 +796,7 @@
result.put(TextAttribute.RUN_DIRECTION,
TextAttribute.RUN_DIRECTION_RTL);
switch (s.charAt(0)) {
- case 'b': // bidi-override
+ case 'b': // bidi-override
result.put(TextAttribute.BIDI_EMBEDDING,
new Integer(-1));
break;
1.4 +3 -5 xml-batik/sources/org/apache/batik/bridge/SVGUseElementBridge.java
Index: SVGUseElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGUseElementBridge.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SVGUseElementBridge.java 2001/02/01 13:45:46 1.3
+++ SVGUseElementBridge.java 2001/02/06 09:31:00 1.4
@@ -42,7 +42,7 @@
* A factory for the <use> SVG element.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: SVGUseElementBridge.java,v 1.3 2001/02/01 13:45:46 tkormann Exp $
+ * @version $Id: SVGUseElementBridge.java,v 1.4 2001/02/06 09:31:00 tkormann Exp $
*/
public class SVGUseElementBridge
implements GraphicsNodeBridge,
@@ -53,8 +53,7 @@
CompositeGraphicsNode gn = new CompositeGraphicsNode();
- CSSStyleDeclaration decl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx,
@@ -100,8 +99,7 @@
public void buildGraphicsNode(GraphicsNode gn,
BridgeContext ctx,
Element element) {
- CSSStyleDeclaration decl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration decl = CSSUtilities.getComputedStyle(element);
CSSPrimitiveValue val =
(CSSPrimitiveValue)decl.getPropertyCSSValue(ATTR_OPACITY);
1.8 +3 -5 xml-batik/sources/org/apache/batik/experiment/TextPathElementBridge.java
Index: TextPathElementBridge.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/experiment/TextPathElementBridge.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TextPathElementBridge.java 2001/02/06 01:56:36 1.7
+++ TextPathElementBridge.java 2001/02/06 09:31:11 1.8
@@ -69,7 +69,7 @@
* A factory for the <textPath> SVG element.
*
* @author <a href="mailto:dean@w3.org">Dean Jackson</a>
- * @version $Id: TextPathElementBridge.java,v 1.7 2001/02/06 01:56:36 vhardy Exp $
+ * @version $Id: TextPathElementBridge.java,v 1.8 2001/02/06 09:31:11 tkormann Exp $
*/
public class TextPathElementBridge implements GraphicsNodeBridge, SVGConstants {
protected final static Map fonts = new HashMap(11);
@@ -95,8 +95,7 @@
//System.out.println("creating Text Path node");
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx,
cssDecl);
@@ -409,8 +408,7 @@
SVGElement svgElement = (SVGElement) element;
- CSSStyleDeclaration cssDecl
- = ctx.getViewCSS().getComputedStyle(element, null);
+ CSSStyleDeclaration cssDecl = CSSUtilities.getComputedStyle(element);
UnitProcessor.Context uctx
= new DefaultUnitProcessorContext(ctx,