[66] | 1 | <html><body><pre> |
---|
| 2 | <!-- |
---|
| 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 | <!-- |
---|
| 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 | <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 | <jsp:directive.page contentType="image/svg+xml" /> |
---|
| 29 | <title>JSP 2.0 JSPX</title> |
---|
| 30 | <!-- select name parameter, or default to JSPX --> |
---|
| 31 | <c:set var="name" value='${empty fn:escapeXml(param["name"]) ? "JSPX" : fn:escapeXml(param["name"])}'/> |
---|
| 32 | <g id="testContent"> |
---|
| 33 | <text class="title" x="50%" y="10%" font-size="15" text-anchor="middle" > |
---|
| 34 | JSP 2.0 XML Syntax (.jspx) Demo</text> |
---|
| 35 | <text class="title" x="50%" y="15%" font-size="15" text-anchor="middle" > |
---|
| 36 | Try changing the name parameter!</text> |
---|
| 37 | <g opacity="1.0" transform="translate(225, 250)" id="rotatedText"> |
---|
| 38 | <c:forEach var="i" begin="1" end="24"> |
---|
| 39 | <jsp:text> |
---|
| 40 | <![CDATA[<g opacity="0.95" transform="scale(1.05) rotate(15)">]]> |
---|
| 41 | </jsp:text> |
---|
| 42 | <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}</text> |
---|
| 45 | </c:forEach> |
---|
| 46 | <c:forEach var="i" begin="1" end="24"> |
---|
| 47 | <jsp:text><![CDATA[</g>]]></jsp:text> |
---|
| 48 | </c:forEach> |
---|
| 49 | <text style="font-size:75;font-family:Serif;fill:white" |
---|
| 50 | text-anchor="middle">${name}</text> |
---|
| 51 | </g> |
---|
| 52 | </g> |
---|
| 53 | </svg> |
---|
| 54 | </pre></body></html> |
---|