From 9b17c39acb66a02b8553209bc035e759413034f3 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Fri, 14 Jul 2000 07:06:46 +0000 Subject: [PATCH] svg documentation with a makedoc and build to generate the pdf docs with a bunch of svg tests git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193500 13f79535-47bb-0310-9956-ffa450edef68 --- docs/examples/svg/All.xml | 12 + docs/examples/svg/BasicExamples.xml | 193 + docs/examples/svg/Design.xml | 365 ++ docs/examples/svg/Document.dtd | 35 + docs/examples/svg/Examples.xml | 10 + docs/examples/svg/LargeExamples.xml | 67 + docs/examples/svg/Misc.xml | 34 + docs/examples/svg/MoreTests.xml | 78 + docs/examples/svg/Tests.xml | 10 + docs/examples/svg/UnitTests.xml | 107 + docs/examples/svg/apache-diagrams.xml | 540 ++ docs/examples/svg/arch-diagrams.xml | 70 + docs/examples/svg/build.xml | 156 + docs/examples/svg/diagrams.dtd | 9 + docs/examples/svg/ex-diagrams.xml | 200 + docs/examples/svg/makedoc.bat | 25 + docs/examples/svg/makedoc.sh | 25 + docs/examples/svg/misc-diagrams.xml | 4639 +++++++++++++++++ docs/examples/svg/mozilla-diagrams.xml | 122 + docs/examples/svg/test/initialCoords.svg | 23 + docs/examples/svg/test/junk.svg | 11 + docs/examples/svg/test/molecule.svg | 72 + docs/examples/svg/test/nested.svg | 45 + docs/examples/svg/test/newCSSUnits.svg | 41 + docs/examples/svg/test/newCoordSys.svg | 32 + docs/examples/svg/test/newViewport.svg | 16 + docs/examples/svg/test/origCoordSys.svg | 16 + .../examples/svg/test/preserveAspectRatio.svg | 156 + docs/examples/svg/test/rotateScale.svg | 40 + docs/examples/svg/test/shapes.svg | 50 + docs/examples/svg/test/skew.svg | 37 + docs/examples/svg/test/transformTest.svg | 31 + docs/examples/svg/test/units.svg | 22 + docs/examples/svg/test/use01.svg | 10 + docs/examples/svg/test/use02.svg | 17 + docs/examples/svg/test/use03.svg | 9 + docs/examples/svg/test/viewBox1.svg | 21 + docs/examples/svg/test/viewBox2.svg | 24 + 38 files changed, 7370 insertions(+) create mode 100644 docs/examples/svg/All.xml create mode 100644 docs/examples/svg/BasicExamples.xml create mode 100644 docs/examples/svg/Design.xml create mode 100644 docs/examples/svg/Document.dtd create mode 100644 docs/examples/svg/Examples.xml create mode 100644 docs/examples/svg/LargeExamples.xml create mode 100644 docs/examples/svg/Misc.xml create mode 100644 docs/examples/svg/MoreTests.xml create mode 100644 docs/examples/svg/Tests.xml create mode 100644 docs/examples/svg/UnitTests.xml create mode 100644 docs/examples/svg/apache-diagrams.xml create mode 100644 docs/examples/svg/arch-diagrams.xml create mode 100644 docs/examples/svg/build.xml create mode 100644 docs/examples/svg/diagrams.dtd create mode 100644 docs/examples/svg/ex-diagrams.xml create mode 100755 docs/examples/svg/makedoc.bat create mode 100755 docs/examples/svg/makedoc.sh create mode 100644 docs/examples/svg/misc-diagrams.xml create mode 100644 docs/examples/svg/mozilla-diagrams.xml create mode 100644 docs/examples/svg/test/initialCoords.svg create mode 100644 docs/examples/svg/test/junk.svg create mode 100644 docs/examples/svg/test/molecule.svg create mode 100644 docs/examples/svg/test/nested.svg create mode 100644 docs/examples/svg/test/newCSSUnits.svg create mode 100644 docs/examples/svg/test/newCoordSys.svg create mode 100644 docs/examples/svg/test/newViewport.svg create mode 100644 docs/examples/svg/test/origCoordSys.svg create mode 100644 docs/examples/svg/test/preserveAspectRatio.svg create mode 100644 docs/examples/svg/test/rotateScale.svg create mode 100644 docs/examples/svg/test/shapes.svg create mode 100644 docs/examples/svg/test/skew.svg create mode 100644 docs/examples/svg/test/transformTest.svg create mode 100644 docs/examples/svg/test/units.svg create mode 100644 docs/examples/svg/test/use01.svg create mode 100644 docs/examples/svg/test/use02.svg create mode 100644 docs/examples/svg/test/use03.svg create mode 100644 docs/examples/svg/test/viewBox1.svg create mode 100644 docs/examples/svg/test/viewBox2.svg diff --git a/docs/examples/svg/All.xml b/docs/examples/svg/All.xml new file mode 100644 index 000000000..0335b0fcc --- /dev/null +++ b/docs/examples/svg/All.xml @@ -0,0 +1,12 @@ + + + + SVG Tests + + Some test SVG documents embedded into fo. + + + + + + diff --git a/docs/examples/svg/BasicExamples.xml b/docs/examples/svg/BasicExamples.xml new file mode 100644 index 000000000..883af57db --- /dev/null +++ b/docs/examples/svg/BasicExamples.xml @@ -0,0 +1,193 @@ + + + + Basic SVG Examples + + Shows some of the basic svg elements when placed in FO. + + + Examples +
+ Introduction + +

+ These examples show the areas of SVG currently implemented. +

+

+ This is provided so that others can see how to write the svg elements + and the result to expect. +

+ +
+
+ Graphic Elements + + SVG Examples + examples + +

+ The SVG xml data is capable of any type of drawing, + from simple lines and shapes to complex shading, colouring + and transformations. +

+

+ Currently only a small set of the possibilities are implemented. +

+ +
+ + Basic Shapes + +

+ Lines can be draw, they map directly to PDF data. + ex-lines + The example above shows some lines. +

+

+ The rectangle is a simple shape, which maps directly + to PDF data. + ex-rect + The example above is a simple rectangle, circle and ellipse. +

+

+ The circle and ellipse are drawn by creating four curves + that make up the shape. +

+

+ All shapes can have style applied to them. Style can also + be inherited from a surrounding <svg:g> element. +

+ +
+ + Curves and Paths + +

+ ex-paths + Paths have no effect by themselves unless there + is some style applied. The default styling is set + by the svg area. +

+

+ There are many possible parts to a path. There are simple + moveto, lineto and closepath commands. There are also + a number of curve commands that create Bezier curves etc. +

+ +
+ + Poly Elements + +

+ ex-poly + Polylines and Polygons are multi-point lines + made up of straight lines. A polygon has a close path + at the end. Note how the numbers in the points + property can be over a number of lines to make it + easier to read. +

+

+ The only difference between the polyline and the polygon + is that a polygon has a close path at the end. +

+ +
+ + Styling + +

+ ex-style + Most elements can have style. The style information + is a list of properties separated by a ';'. The + property name and value are separated by a ':'. + Notice how the style of the sub-element overrides that + of all the ones in the heirarchy, the element also inherits + all the other style data. +

+ +
+ + G Element + +

+ ex-g + The G element can contain any other graphic + element, including other G elements. The purpose + of this is to enable style and transform to apply + to a group of graphic elements. The elements have no + other relationship except they are drawn together. +

+ +
+ + Transform + +

+ The transform of an element can do all the usual + mathematical transforms. These can be represented by + a matrix for use in the pdf. The options include + translate, scale, rotate, shear etc. +

+

+ The transform of an element is accumulative from + its ancestors. That is, if a transform is applied to + a <svg:g> element then any graphic element also + has that transform applied to it. If the child + element has a transform then its transform is also + applied after the transform of the parent. +

+

+ ex-transform +

+ +
+ + Text Elements + +

+ ex-text + Text can be placed in any position and with style. +

+ +
+ + Clipping, Masking + +

+ Not yet implemented. + The SVG area is clipped to start with. +

+ +
+ + Text Paths + +

+ ex-textpath + The above example shows the <svg:use> and textPath + elements in action. +

+ +
+ + Images + +

+ ex-image + The above example shows the <svg:image> with position + and sizing elements in action. +

+ +
+ + SVG Element + +

+ ex-misc + Doing some silly stuff with svg elements. +

+ +
+
+
+
diff --git a/docs/examples/svg/Design.xml b/docs/examples/svg/Design.xml new file mode 100644 index 000000000..8754c134e --- /dev/null +++ b/docs/examples/svg/Design.xml @@ -0,0 +1,365 @@ + + + + SVG in FOP Design + The design for implementing SVG rendering inside FOP. This is out of date. + + SVG Elements +
+ Purpose + + Background + +

+ FOP is a formatting object parser written in Java. +

+

+ Apache is heading the effort to create the parser to create + PDF documents from XML files including formatting objects. +

+

+ SVG is another XML structure type that contains scaleable + vector graphics. This document is about embedding SVG data + inside a FOP XML structure so that the SVG will be rendered + to the resulting PDF document. +

+ +
+ + Aim + +

+ The primary aim is to enable the parsing of all SVG elements + as described in the document "WD-SVG-20000303.pdf". This applies + to the stylable elements. +

+

+ The java interface is available from - + "http://www.w3.org/TR/2000/03/WD-SVG-20000303/java-binding-stylable.zip" +

+

+ As the SVG elements include information for animation and + other things then not all elements or properties will be + rendered. +

+

+ The implementation should be considered as separate from + the implementation and rendering of the FOP and PDF data. + This will allow it to be more general and to be used for + direct drawing or printing. +

+ +
+
+
+ + Design +
+ FOP Rendering + fop + + Rendering Process + fop-flow + +

+ The process of converting an FOP XML file into the + PDF document is handled by the FOP parser. +

+

+ The document is first turned into an in memory hierarchy + of objects that represent the fo document. The objects are + then layed out into pages. The objects are then rendered + into PDF data. +

+

+ These three steps are separate. +

+ +
+
+
+ + Design +
+ Overall Design of SVG elements + overall + + SVG Nodes + +

+ The FObj.layout is called whenever the parser encounters an + XML node. The class that is called depends on the element + mapping. +

+

+ The <svg:g> element is used to contain other elements + including other <svg:g>'s. This element is purely to + set style and transform data on other elements. + The GraphicsCreator interface is used to create Graphic + element that can be placed into the <svg:g> graphic. +

+

+ The <svg:text> element can contain elements that modify + the position and style of text. The TextElement interface is + used to create the element which is placed in a list along + with any strings in the text node. +

+ +
+ + SVG Graphic Elements + +

+ All drawing elements in an SVG area must extend the Graphic + class. This provides information about the style and transform. + Transform is accumulative, therefore the transform for a + particular element is obtained by combining all the transforms + of the current element and all super elements. A list is + created by adding each succesive transform into a list. +

+

+ The graphic elements also contain style data, this behaves + in a different manner. The style for an element is obtained + by starting with the top ancestor of the element and overriding + any style elements set in each of the elements in the hierachy. + This is done by using an style infromation map. +

+ +
+ + Rendering + +

+ The main purpose of the SVG elements in this context + is to be able to render the data to a PDF document. + This should not limit the approach or the usefullness + of the SVG in memory data. +

+

+ The data should contain all the available information + without changing the meaning of elements or properties. +

+

+ The are some examples of data that should be interpreted + when rendering, or otherwise presenting the data to the user, + which can be altered and still be eqivalent. + This includes paths that contain multiple moveto's and + the closepath part. Since the information is necessary + for the proper display and editing then the information + should always be retained with the original meaning. + The path end points etc differ depending on the path + instructions. +

+ +
+
+
+ + Integration +
+ Integration of SVG with FOP + integration + + Areas of Interaction + +

+ The PDF renderer converts all the FOP data into the + PDF markup. This is also where the SVG elements are + output into the PDF stream. +

+

+ The FOP parsing incorporates the idea of areas that + contain FONode data. These nodes contain the data + that is rendered into the area. The SVG element + (<svg:svg> element) forms an area. Then as each + SVG subnode is parsed it is placed within the SVG area. + The SVG area then contains a list of Graphic elements + that constitute the SVG graphic. Almost all Graphic + elements can have style and transform properties. + These properties are place into the graphic element. +

+

+ As the <svg:g> element can contain many other + Graphic elements then it must be able to create and add + the Graphic to itself as each subnode is parsed. +

+ +
+ + XML Specifics + +

+ An SVG area can be placed within a <fo:block> ??. + This is provided that the appropriate svg namespace is + defined. + All the svg elements must be within the <svg:svg> + element. +

+

+ When the SVG area is being parsed then it must be able + to create a representative data set in memory for use + later. +

+

+ The data must fully represent the information in a way + that is efficient to create and use. +

+

+ There are a few elements that can contain other elements, + these include <svg:g>, <svg:text>, <svg:use> etc. + The FOP parser technique uses layout() to create + a component and layout it within the area. This is not suitable + for elements that are not directly sub nodes of the SVG + area. The technique used is for the SVG elements is to implement + an interface suitable for the element. For example the Rect + implements GraphicsCreator so that the parent G can create + the Graphics object when the parser calls addChild. +

+ +
+ + Rendering + +

+ The SVG area contains a list of all the svg elements that can + be drawn. This list is simply iterated and each element drawn + in order. + Each subsequent element always draws over the previous element. +

+

+ The drawing is clipped to the SVG area bounds. +

+

+ As each element may contain its own style and transform + then before each element is rendered the style and + coordinate matrix ?? are set if it has changed. +

+ +
+
+
+ + Design of Components +
+ Graphic Elements + graphic + + Class Hierachy + +

+ All usual graphic elements that can be drawn in the SVG + area or a <svg:g> element must extend the Graphic + class. This serves as a common object type and to hold + information about the style and transform of the element. + Since the style and transform inherit information (in a way + that cannnot be done with simple XML inheritance) then + each graphic element also stores the parent element (if + applicable). +

+

+ The text element may contain TSpan elements which are not + themselves Graphic elements. +

+

+ The SVG area contains the title, description, definitions + and all the Graphic objects. +

+ +
+ + Grouping + +

+ The SVG area contains a list of Graphic elements that + can be rendered. +

+

+ The SVG area also contains definitions of Graphic + elements that can be used by other graphic elements + for clipping, paths etc. The definitions must contain + a unique id (XML id) which can be used to refer to them. +

+ +
+
+
+ XML Data + nodes + + Nodes + +

+ There are two important type of information, these + are the XML nodes and the properties of these nodes. + The parsing process used with FOP uses element mapping + and property mapping to enable the creation of objects + that correspond to each node or property. +

+ +
+ + Properties + +

+ There are a number of important element properties that + differ and extend the FOP properties. +

+

+ The style and transform properties have particular + behaviours that are handled through the Graphic object. +

+ +
+ + Parsing Process + +

+ There are three steps going from the SVG data (contained + in the FOP) to the resulting PDF document (or other + rendering result). +

+

+ When the fop parsing encounters an <svg:svg> element + then it creates and SVG area object. The layout is called + for this object which parses all sub nodes. Each sub node + can then parse its information and add itself to the area. +

+

+ The layout of each node is done before any of the sub nodes + of the particular node, this means that the information + for the node is incomplete when it is added to the area. +

+

+ The parsing of the node is converted into a Graphic element + with its style and transform set. The G element can add the + Graphic to itself or the element can add itself to the SVG + area. +

+

+ Once the parsing is complete we have a representation of + the SVG data in memory. This information can then be used + to render/manipulate etc. +

+

+ The pdf rendering is done by rendering each element in the + SVG area. The style is set for the element before it is + rendered. If the element is a G or text object then each + sub-element is rendered. +

+ +
+ + Graphic + +

+ graphic-structure + The graphic elements (almost) all contain style and transform + data. This is stored in a way that allows the information + to be combined when determining the style/transform for an element + with style/transform set in one or more ancestors. +

+ +
+
+
+
diff --git a/docs/examples/svg/Document.dtd b/docs/examples/svg/Document.dtd new file mode 100644 index 000000000..c9cb7bd28 --- /dev/null +++ b/docs/examples/svg/Document.dtd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/svg/Examples.xml b/docs/examples/svg/Examples.xml new file mode 100644 index 000000000..612823156 --- /dev/null +++ b/docs/examples/svg/Examples.xml @@ -0,0 +1,10 @@ + + + + SVG Tests + + Some test SVG documents embedded into fo. + + + + diff --git a/docs/examples/svg/LargeExamples.xml b/docs/examples/svg/LargeExamples.xml new file mode 100644 index 000000000..3d80ccf37 --- /dev/null +++ b/docs/examples/svg/LargeExamples.xml @@ -0,0 +1,67 @@ + + + + Large SVG Examples + + Some large svg examples which have many shapes. + + + Examples +
+ Introduction + +

+ These examples show the areas of SVG currently implemented. +

+

+ This is provided so that others can see how to write the svg elements + and the result to expect. +

+ +
+
+ Graphic Elements + + Miscellaneous + +

+ misc-lion + A lion +

+

+ misc-molecule + A molecule +

+

+ misc-newlion + Another lion +

+

+ misc-picasso + A Picasso picture +

+

+ misc-svglogo + The SVG View logo +

+

+ misc-tiger + A tiger +

+

+ apache-foplogo + FOP logo in SVG. +

+

+ apache-xml + Apache logo in SVG. +

+

+ mozilla-xml + Mozilla logo in SVG. +

+ +
+
+
+
diff --git a/docs/examples/svg/Misc.xml b/docs/examples/svg/Misc.xml new file mode 100644 index 000000000..a63dded69 --- /dev/null +++ b/docs/examples/svg/Misc.xml @@ -0,0 +1,34 @@ + + + + Miscellaneous SVG Examples + + Some general svg examples. + + + Examples +
+ Introduction + +

+ These examples show the areas of SVG currently implemented. +

+

+ This is provided so that others can see how to write the svg elements + and the result to expect. +

+ +
+
+ Graphic Elements + + Miscellaneous + +

+ Various styles and other drawing things. +

+ +
+
+
+
diff --git a/docs/examples/svg/MoreTests.xml b/docs/examples/svg/MoreTests.xml new file mode 100644 index 000000000..fa5f7a025 --- /dev/null +++ b/docs/examples/svg/MoreTests.xml @@ -0,0 +1,78 @@ + + + + More SVG Tests + + Some more SVG tests. + + + Examples +
+ Introduction + +

+ These examples show the areas of SVG currently implemented. +

+

+ This is provided so that others can see how to write the svg elements + and the result to expect. +

+ +
+
+ Graphic Elements + + Miscellaneous + +

+ Various styles and other drawing things. +

+

+ misc-arc + Arcs +

+

+ misc-gradients + Gradients +

+

+ misc-paths + Paths +

+

+ misc-radial + Radial +

+

+ misc-rotate + Rotations +

+

+ misc-rototext + Rotated text +

+

+ misc-shapes + Shapes +

+

+ misc-stroke + Strokes +

+

+ misc-test + Tests +

+

+ misc-transform + Transforms +

+

+ misc-opac + Opacity +

+ +
+
+
+
diff --git a/docs/examples/svg/Tests.xml b/docs/examples/svg/Tests.xml new file mode 100644 index 000000000..c04245d0c --- /dev/null +++ b/docs/examples/svg/Tests.xml @@ -0,0 +1,10 @@ + + + + SVG Tests + + Some test SVG documents embedded into fo. + + + + diff --git a/docs/examples/svg/UnitTests.xml b/docs/examples/svg/UnitTests.xml new file mode 100644 index 000000000..458acacd1 --- /dev/null +++ b/docs/examples/svg/UnitTests.xml @@ -0,0 +1,107 @@ + + + + Unit Tests for SVG in FO + + Some unit tests to check out the rendering of svg. + + + Examples +
+ Introduction + +

+ These examples show the areas of SVG currently implemented. +

+

+ This is provided so that others can see how to write the svg elements + and the result to expect. +

+ +
+
+ Graphic Elements + + Miscellaneous + +

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+ +

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+ +

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+

+ + unit test +

+ +
+
+
+
diff --git a/docs/examples/svg/apache-diagrams.xml b/docs/examples/svg/apache-diagrams.xml new file mode 100644 index 000000000..19318ea07 --- /dev/null +++ b/docs/examples/svg/apache-diagrams.xml @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The XML Publishing Framework + + + The XML Publishing Framework + + + + AP + A + CHE XML + + + THE + + + PROJECT + + + + + diff --git a/docs/examples/svg/arch-diagrams.xml b/docs/examples/svg/arch-diagrams.xml new file mode 100644 index 000000000..87255e68c --- /dev/null +++ b/docs/examples/svg/arch-diagrams.xml @@ -0,0 +1,70 @@ + + + + + + + Overall design diagram of SVG elements in FOP + SVG Elements Overall Design + + + FOP + + + + SVG + + + G + + + layout + + + + + + + The FOP parsing flow. + SVG Elements Overall Design + + + FOP + + + + SVG + + + G + + + layout + + + + + + + Overall design diagram of SVG elements in FOP + SVG Elements Overall Design + + + FOP + + + + SVG + + + G + + + layout + + + + diff --git a/docs/examples/svg/build.xml b/docs/examples/svg/build.xml new file mode 100644 index 000000000..8aa448e78 --- /dev/null +++ b/docs/examples/svg/build.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/svg/diagrams.dtd b/docs/examples/svg/diagrams.dtd new file mode 100644 index 000000000..c3486d9b8 --- /dev/null +++ b/docs/examples/svg/diagrams.dtd @@ -0,0 +1,9 @@ + + + + + diff --git a/docs/examples/svg/ex-diagrams.xml b/docs/examples/svg/ex-diagrams.xml new file mode 100644 index 000000000..4e2131899 --- /dev/null +++ b/docs/examples/svg/ex-diagrams.xml @@ -0,0 +1,200 @@ + + + + + + Examples for demonstrating SVG elements in FOP + SVG Examples + + + + + + + + + + + + + + + + + + + + + SVG + is + + very + + + flexible! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SVG + + + + + + + + Referenced character data + + + Text with area style + SVG + SVG + + text + and tspan + does + + lots of + + + things + + + + text + can be spaced + + and positioned + + + + + Inline character data + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example, simple text on a path + + + + We go up, then we go down, then up again + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/svg/makedoc.bat b/docs/examples/svg/makedoc.bat new file mode 100755 index 000000000..ce6d65d34 --- /dev/null +++ b/docs/examples/svg/makedoc.bat @@ -0,0 +1,25 @@ +@echo off + +echo Building Fop documentation (pdf) +echo ---------------- + +if "%JAVA_HOME%" == "" goto error + +set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;..\..\..\lib\ant.jar;..\..\..\lib\xml.jar;..\..\..\lib;..\..\..\build\fop.jar;..\..\..\lib\w3c.jar +set ANT_HOME=..\..\..\lib + + +%JAVA_HOME%\bin\java.exe -Dant.home=%ANT_HOME% -classpath %LOCALCLASSPATH%;%CLASSPATH% org.apache.tools.ant.Main %1 %2 %3 %4 %5 + +goto end + +:error + +echo ERROR: JAVA_HOME not found in your environment. +echo Please, set the JAVA_HOME variable in your environment to match the +echo location of the Java Virtual Machine you want to use. + +:end + +rem set LOCALCLASSPATH= + diff --git a/docs/examples/svg/makedoc.sh b/docs/examples/svg/makedoc.sh new file mode 100755 index 000000000..2c5784e0f --- /dev/null +++ b/docs/examples/svg/makedoc.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +echo +echo "Converting Fop's xml documentation into a pdf file" +echo "----------------" +echo + +if [ "$JAVA_HOME" = "" ] ; then + echo "ERROR: JAVA_HOME not found in your environment." + echo + echo "Please, set the JAVA_HOME variable in your environment to match the" + echo "location of the Java Virtual Machine you want to use." + exit 1 +fi + +LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:../../../lib/ant.jar:../../../lib/xml.jar:../../../lib/w3c.jar:../../../lib:../../../build/fop.jar +ANT_HOME=../../../lib + +echo Building with classpath $CLASSPATH:$LOCALCLASSPATH +echo + +echo Starting Ant... +echo + +$JAVA_HOME/bin/java -Dant.home=$ANT_HOME -classpath "$LOCALCLASSPATH:$CLASSPATH" org.apache.tools.ant.Main $* diff --git a/docs/examples/svg/misc-diagrams.xml b/docs/examples/svg/misc-diagrams.xml new file mode 100644 index 000000000..dc8dd241e --- /dev/null +++ b/docs/examples/svg/misc-diagrams.xml @@ -0,0 +1,4639 @@ + + + + + + + + + + + + + + + + + + + + + + Gradient painting + + + + + + + + + + Gradient Fills + + + + + + + + + + + +A cute lion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSC +Number: 3283 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + N + Cl + N + Cl + Cl + Cl + + + + + +The Cute Lion Cub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Some paths + + + + + + + + + + + + + + + + + + + + + + + + + + +Picasso.pdx exported by Mayura Draw 3.6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Girl Before a Mirror + + +Picasso, 1932, oil on canvas; 64 x 51 1/2 in. +The Museum of Modern Art, New York. + + + + + + + + + + + + + + + + + + + + Gradient painting + + + + + + + + + + Simple shapes + + + + + + + + + + + + + + + + + + + + + + + + + MyText + + Rotated Text Example + + + + + + + + Roto + Roto + Roto + Roto + + + + Roto + Roto + Roto + Roto + + + + + + + + + + + Simple shapes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Viewer Logo + + + + + + SVG + + + + Viewer + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gradient Text + + + two groups, each of two rectangles + + + Bella's test SVG file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +A less cute tiger + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/svg/mozilla-diagrams.xml b/docs/examples/svg/mozilla-diagrams.xml new file mode 100644 index 000000000..2163d74aa --- /dev/null +++ b/docs/examples/svg/mozilla-diagrams.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/examples/svg/test/initialCoords.svg b/docs/examples/svg/test/initialCoords.svg new file mode 100644 index 000000000..377f258b4 --- /dev/null +++ b/docs/examples/svg/test/initialCoords.svg @@ -0,0 +1,23 @@ + + + + Initial Coords + Example InitialCoords - SVG's initial coordinate system + + + + + + + + + + + (0,0) + (300,0) + (0,100) + + \ No newline at end of file diff --git a/docs/examples/svg/test/junk.svg b/docs/examples/svg/test/junk.svg new file mode 100644 index 000000000..449373dec --- /dev/null +++ b/docs/examples/svg/test/junk.svg @@ -0,0 +1,11 @@ + + + + + + + + Hello SVG! + + diff --git a/docs/examples/svg/test/molecule.svg b/docs/examples/svg/test/molecule.svg new file mode 100644 index 000000000..36eb4aefd --- /dev/null +++ b/docs/examples/svg/test/molecule.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + C + + diff --git a/docs/examples/svg/test/nested.svg b/docs/examples/svg/test/nested.svg new file mode 100644 index 000000000..816053cde --- /dev/null +++ b/docs/examples/svg/test/nested.svg @@ -0,0 +1,45 @@ + + + + Nested + Example Nested - Nested transformations + + + + + + + + + + + + + + + ....Translate(1) + + + + + + + + + + ....Rotate(2) + + + + + + + + + + ....Translate(3) + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/newCSSUnits.svg b/docs/examples/svg/test/newCSSUnits.svg new file mode 100644 index 000000000..80e1769c5 --- /dev/null +++ b/docs/examples/svg/test/newCSSUnits.svg @@ -0,0 +1,41 @@ + + + + Redefining CSS Units + Transformation with establishment of a new viewport + + + + This prints 12 pixels high. + This prints 12 pixels high. + + + + + This prints 24 pixels high. + + This prints 12 pixels high. + + + + + + + + This prints 36 pixels high. + This prints 36 pixels high. + + + \ No newline at end of file diff --git a/docs/examples/svg/test/newCoordSys.svg b/docs/examples/svg/test/newCoordSys.svg new file mode 100644 index 000000000..8b5d23be3 --- /dev/null +++ b/docs/examples/svg/test/newCoordSys.svg @@ -0,0 +1,32 @@ + + + + NewCoordSys + Example NewCoordSys - New user coordinate system + + + + + + + + + ABC (orig coord system) + + + + + + + + + + + + ABC (translated coord system) + + + \ No newline at end of file diff --git a/docs/examples/svg/test/newViewport.svg b/docs/examples/svg/test/newViewport.svg new file mode 100644 index 000000000..2b45b7cc6 --- /dev/null +++ b/docs/examples/svg/test/newViewport.svg @@ -0,0 +1,16 @@ + + + + New Viewport + This SVG drawing embeds another one, + thus establishing a new viewport + + + + + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/origCoordSys.svg b/docs/examples/svg/test/origCoordSys.svg new file mode 100644 index 000000000..2b124e371 --- /dev/null +++ b/docs/examples/svg/test/origCoordSys.svg @@ -0,0 +1,16 @@ + + + + OrigCoordSys + Example OrigCoordSys - Simple transformations: original picture + + + + + + + + ABC (orig coord system) + + + \ No newline at end of file diff --git a/docs/examples/svg/test/preserveAspectRatio.svg b/docs/examples/svg/test/preserveAspectRatio.svg new file mode 100644 index 000000000..b88e0c272 --- /dev/null +++ b/docs/examples/svg/test/preserveAspectRatio.svg @@ -0,0 +1,156 @@ + + + + PreserveAspectRatio + Example PreserveAspectRatio - demonstrate available options + + SVG to fit + + + + :) + + + Viewport 1 + + + + Viewport 2 + + + + + --------------- meet --------------- + + xMin* + + + + + :) + + + + + xMid* + + + + + :) + + + + + xMax* + + + + :) + + + + + ---------- meet ---------- + + *YMin + + + + :) + + + + + *YMid + + + + + :) + + + + + *YMax + + + + + :) + + + + + ---------- slice ---------- + + xMin* + + + + + :) + + + + + xMid* + + + + + :) + + + + + xMax* + + + + + :) + + + + + --------------- slice --------------- + + *YMin + + + + + :) + + + + *YMid + + + + :) + + + + *YMax + + + + :) + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/rotateScale.svg b/docs/examples/svg/test/rotateScale.svg new file mode 100644 index 000000000..c330ad82e --- /dev/null +++ b/docs/examples/svg/test/rotateScale.svg @@ -0,0 +1,40 @@ + + + + RotateScale + Example RotateScale - Rotate and scale transforms + + + + + + + + + + + + + + + + ABC (rotate) + + + + + + + + + + + + + ABC (scale) + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/shapes.svg b/docs/examples/svg/test/shapes.svg new file mode 100644 index 000000000..11f710f10 --- /dev/null +++ b/docs/examples/svg/test/shapes.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + Simple shapes + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/skew.svg b/docs/examples/svg/test/skew.svg new file mode 100644 index 000000000..f5a67cff3 --- /dev/null +++ b/docs/examples/svg/test/skew.svg @@ -0,0 +1,37 @@ + + + + Skew + Example Skew - Show effects of skewX and skewY + + + + + + + + + + + + + + ABC (skewX) + + + + + + + + + + + + ABC (skewY) + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/transformTest.svg b/docs/examples/svg/test/transformTest.svg new file mode 100644 index 000000000..e9f666d63 --- /dev/null +++ b/docs/examples/svg/test/transformTest.svg @@ -0,0 +1,31 @@ + + + + Nested verses Transform list test + This is to test that the transformations are being applied in + the correct order. Both squares should be first filled and + then outlined in the same position. If the outlines are in + the wrong position then something is wrong. + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/units.svg b/docs/examples/svg/test/units.svg new file mode 100644 index 000000000..a319177eb --- /dev/null +++ b/docs/examples/svg/test/units.svg @@ -0,0 +1,22 @@ + + + + Units + Demonstration of coordinate transforms + + + + This prints 12 pixels high. + This prints 12 pixels high. + + + + This prints 24 pixels high. + + This prints 12 pixels high. + + \ No newline at end of file diff --git a/docs/examples/svg/test/use01.svg b/docs/examples/svg/test/use01.svg new file mode 100644 index 000000000..f8bf4e7a0 --- /dev/null +++ b/docs/examples/svg/test/use01.svg @@ -0,0 +1,10 @@ + + + + Use01 + Example Use01 - Simple case of 'use' on a 'rect' + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/use02.svg b/docs/examples/svg/test/use02.svg new file mode 100644 index 000000000..cc6dc987d --- /dev/null +++ b/docs/examples/svg/test/use02.svg @@ -0,0 +1,17 @@ + + + + Use02 + Example Use02 - 'use' on a 'symbol' + + + MySymbol - four rectangles in a grid + + + + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/use03.svg b/docs/examples/svg/test/use03.svg new file mode 100644 index 000000000..e260f395b --- /dev/null +++ b/docs/examples/svg/test/use03.svg @@ -0,0 +1,9 @@ + + + + Example Use03 - 'use' with a 'transform' attribute + + + + + \ No newline at end of file diff --git a/docs/examples/svg/test/viewBox1.svg b/docs/examples/svg/test/viewBox1.svg new file mode 100644 index 000000000..3057fe7b9 --- /dev/null +++ b/docs/examples/svg/test/viewBox1.svg @@ -0,0 +1,21 @@ + + + + ViewBox1 + Example ViewBox1 - uses the viewBox + attribute to automatically create an initial user coordinate + system which causes the graphic to scale to fit into the + viewport no matter what size the viewport is. + + + + + + + Stretch to fit + + \ No newline at end of file diff --git a/docs/examples/svg/test/viewBox2.svg b/docs/examples/svg/test/viewBox2.svg new file mode 100644 index 000000000..041b0d015 --- /dev/null +++ b/docs/examples/svg/test/viewBox2.svg @@ -0,0 +1,24 @@ + + + + ViewBox2 + Example ViewBox2 - uses the viewBox + attribute to automatically create an initial user coordinate + system which causes the graphic to scale to fit into the + viewport no matter what size the viewport is. + + + + + + + + + + Stretch to fit + + \ No newline at end of file -- 2.39.5