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 de...@apache.org on 2002/07/31 18:00:11 UTC
cvs commit: xml-batik/sources/org/apache/batik/css/engine/value/svg GlyphOrientationManager.java
deweese 2002/07/31 09:00:08
Modified: samples moonPhases.svg
sources/org/apache/batik/apps/svgbrowser
SVGInputHandler.java
sources/org/apache/batik/bridge BridgeContext.java
PaintServer.java
sources/org/apache/batik/css/engine/value/svg
GlyphOrientationManager.java
Log:
1) glyph-orientation-* will now accept '0' without units (all other
angle specifications must have a unit (rad, deg, etc).
2) Fixed a NPE with alternateStylesheet.svg when selecting another style sheet.
3) PaintServer no longer dies if shape is null on associated object (just
returns null).
4) Fixed a bug in the SVGInputHandler when a url has a null 'path' part
(bit of an odd case really).
5) moonPhases now displays the Japanese version correctly.
Revision Changes Path
1.9 +10 -22 xml-batik/samples/moonPhases.svg
Index: moonPhases.svg
===================================================================
RCS file: /home/cvs/xml-batik/samples/moonPhases.svg,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- moonPhases.svg 17 Dec 2001 16:02:17 -0000 1.8
+++ moonPhases.svg 31 Jul 2002 16:00:07 -0000 1.9
@@ -371,27 +371,15 @@
<g systemLanguage="ja">
<g transform="translate(330, -10)" fill="white" stroke="none" >
- <use transform="scale(2)" xlink:href="#New_Moon" y="455" />
- <use transform="scale(2)" xlink:href="#Waxing_Crescent" y="407" />
- <use transform="scale(2)" xlink:href="#Waxing_Quarter" y="356" />
- <use transform="scale(2)" xlink:href="#Near_Full_Before_Full" y="306" />
- <use transform="scale(2)" xlink:href="#Full_Moon" y="263" />
- <use transform="scale(2)" xlink:href="#Near_Full_After_Full" y="212" />
- <use transform="scale(2)" xlink:href="#Waning_Quarter" y="165" />
- <use transform="scale(2)" xlink:href="#Waning_Quarter" y="113" />
- <use transform="scale(2)" xlink:href="#New_Moon2" y="67" />
-
- <!--
- <text x="0" y="455.0063" >New <tspan x="0" y="465.0063">moon</tspan></text>
- <text x="0" y="407.3906">Waxing <tspan x="0" y="417.3906">crescent</tspan></text>
- <text x="0" y="356.3438" >Waxing <tspan x="0" y="366.3438">quarter</tspan></text>
- <text x="0" y="306.0146" >Near <tspan x="0" y="316.0146">full</tspan></text>
- <text x="0" y="263.7744" >Full <tspan x="0" y="273.7744">moon</tspan></text>
- <text x="0" y="212.3188" >Near <tspan x="0" y="222.3188">full</tspan></text>
- <text x="0" y="165.4707" >Waning <tspan x="0" y="175.4707">quarter</tspan></text>
- <text x="0" y="113.2466" >Waning <tspan x="0" y="123.2466">crescent</tspan></text>
- <text x="0" y="67.1665" >New <tspan x="0" y="77.1665">moon</tspan></text>
- -->
+ <use transform="scale(2)" xlink:href="#New_Moon2" y="33" />
+ <use transform="scale(2)" xlink:href="#Waning_Crescent" y="56" />
+ <use transform="scale(2)" xlink:href="#Waning_Quarter" y="82" />
+ <use transform="scale(2)" xlink:href="#Near_Full_After_Full" y="106" />
+ <use transform="scale(2)" xlink:href="#Full_Moon" y="130" />
+ <use transform="scale(2)" xlink:href="#Near_Full_Before_Full" y="154" />
+ <use transform="scale(2)" xlink:href="#Waxing_Quarter" y="178" />
+ <use transform="scale(2)" xlink:href="#Waxing_Crescent" y="202" />
+ <use transform="scale(2)" xlink:href="#New_Moon" y="227" />
</g>
<g filter="url(#bgRect)">
1.2 +3 -1 xml-batik/sources/org/apache/batik/apps/svgbrowser/SVGInputHandler.java
Index: SVGInputHandler.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/svgbrowser/SVGInputHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SVGInputHandler.java 11 Jul 2002 16:42:45 -0000 1.1
+++ SVGInputHandler.java 31 Jul 2002 16:00:07 -0000 1.2
@@ -76,6 +76,7 @@
}
String path = purl.getPath();
+ if (path == null) return false;
return accept(path);
}
@@ -84,6 +85,7 @@
* Returns true if the resource at the given path can be handled
*/
public boolean accept(String path) {
+ if (path == null) return false;
for (int i=0; i<SVG_FILE_EXTENSIONS.length; i++) {
if (path.endsWith(SVG_FILE_EXTENSIONS[i])) {
return true;
1.51 +5 -3 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.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- BridgeContext.java 13 Jun 2002 11:19:37 -0000 1.50
+++ BridgeContext.java 31 Jul 2002 16:00:07 -0000 1.51
@@ -850,8 +850,10 @@
SVGOMDocument svgDocument = (SVGOMDocument)document;
CSSEngine cssEngine = svgDocument.getCSSEngine();
- cssEngine.removeCSSEngineListener(cssPropertiesChangedListener);
- cssEngine.dispose();
+ if (cssEngine != null) {
+ cssEngine.removeCSSEngineListener(cssPropertiesChangedListener);
+ cssEngine.dispose();
+ }
if (focusManager != null) {
focusManager.dispose();
}
1.6 +2 -1 xml-batik/sources/org/apache/batik/bridge/PaintServer.java
Index: PaintServer.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/PaintServer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PaintServer.java 20 Mar 2002 16:34:43 -0000 1.5
+++ PaintServer.java 31 Jul 2002 16:00:08 -0000 1.6
@@ -148,6 +148,7 @@
Paint strokePaint = convertStrokePaint(e, node, ctx);
Shape shape = node.getShape();
+ if (shape == null) return null;
if (fillPaint != null && strokePaint != null) {
FillShapePainter fp = new FillShapePainter(shape);
fp.setPaint(fillPaint);
1.2 +16 -1 xml-batik/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationManager.java
Index: GlyphOrientationManager.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/engine/value/svg/GlyphOrientationManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GlyphOrientationManager.java 18 Mar 2002 10:28:23 -0000 1.1
+++ GlyphOrientationManager.java 31 Jul 2002 16:00:08 -0000 1.2
@@ -60,7 +60,22 @@
case LexicalUnit.SAC_RADIAN:
return new FloatValue(CSSPrimitiveValue.CSS_RAD,
lu.getFloatValue());
+ case LexicalUnit.SAC_INTEGER:
+ {
+ float n = lu.getIntegerValue();
+ if (n == 0f)
+ return new FloatValue(CSSPrimitiveValue.CSS_DEG, 0f);
+ break;
}
+ case LexicalUnit.SAC_REAL:
+ {
+ float n = lu.getFloatValue();
+ if (n == 0f)
+ return new FloatValue(CSSPrimitiveValue.CSS_DEG, 0f);
+ break;
+ }
+ }
+
throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org