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

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

NutchEz - an easy way to nutch

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