source: nutchez-0.1/tomcat/webapps/examples/jsp/jsp2/jspx/textRotate.jspx.html @ 245

Last change on this file since 245 was 66, checked in by waue, 16 years ago

NutchEz - an easy way to nutch

File size: 2.5 KB
Line 
1<html><body><pre>
2&lt;!--
3  Licensed to the Apache Software Foundation (ASF) under one or more
4  contributor license agreements.  See the NOTICE file distributed with
5  this work for additional information regarding copyright ownership.
6  The ASF licenses this file to You under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with
8  the License.  You may obtain a copy of the License at
9
10      http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17-->
18&lt;!--
19  - This example is based off the textRotate.svg example that comes
20  - with Batik.  The original example was written by Bill Haneman.
21  - This version by Mark Roth.
22  -->
23&lt;svg xmlns="http://www.w3.org/2000/svg"
24     width="450" height="500" viewBox="0 0 450 500"
25     xmlns:c="http://java.sun.com/jsp/jstl/core"
26     xmlns:fn="http://java.sun.com/jsp/jstl/functions"
27     xmlns:jsp="http://java.sun.com/JSP/Page">
28  &lt;jsp:directive.page contentType="image/svg+xml" />
29  &lt;title>JSP 2.0 JSPX&lt;/title>
30  &lt;!-- select name parameter, or default to JSPX -->
31  &lt;c:set var="name" value='${empty fn:escapeXml(param["name"]) ? "JSPX" : fn:escapeXml(param["name"])}'/>
32  &lt;g id="testContent">
33    &lt;text class="title" x="50%" y="10%" font-size="15" text-anchor="middle" >
34            JSP 2.0 XML Syntax (.jspx) Demo&lt;/text>
35    &lt;text class="title" x="50%" y="15%" font-size="15" text-anchor="middle" >
36            Try changing the name parameter!&lt;/text>
37    &lt;g opacity="1.0" transform="translate(225, 250)" id="rotatedText">
38      &lt;c:forEach var="i" begin="1" end="24">
39        &lt;jsp:text>
40          &lt;![CDATA[&lt;g opacity="0.95" transform="scale(1.05) rotate(15)">]]>
41        &lt;/jsp:text>
42        &lt;text x="0" y="0" transform="scale(1.6, 1.6)" fill="DarkSlateBlue"
43              text-anchor="middle" font-size="40" font-family="Serif"
44              id="words">${name}&lt;/text>
45      &lt;/c:forEach>
46      &lt;c:forEach var="i" begin="1" end="24">
47        &lt;jsp:text>&lt;![CDATA[&lt;/g>]]>&lt;/jsp:text>
48      &lt;/c:forEach>
49      &lt;text style="font-size:75;font-family:Serif;fill:white"
50            text-anchor="middle">${name}&lt;/text>
51    &lt;/g>
52  &lt;/g>
53&lt;/svg>
54</pre></body></html>
Note: See TracBrowser for help on using the repository browser.