Java Doc for SVGUtilities.java in  » Graphic-Library » batik » org » apache » batik » bridge » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.apache.batik.bridge 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.batik.bridge.SVGUtilities

SVGUtilities
abstract public class SVGUtilities implements SVGConstants,ErrorConstants(Code)
A collection of utility methods for SVG.
author:
   Thierry Kormann
author:
   Stephane Hillion
version:
   $Id: SVGUtilities.java 504084 2007-02-06 11:24:46Z dvholten $


Field Summary
final public static  shortOBJECT_BOUNDING_BOX
     The objectBoundingBox coordinate system constants.
final public static  shortSTROKE_WIDTH
     The strokeWidth coordinate system constants.
final public static  shortUSER_SPACE_ON_USE
     The userSpaceOnUse coordinate system constants.

Constructor Summary
protected  SVGUtilities()
     No instance of this class is required.

Method Summary
public static  Rectangle2DconvertFilterChainRegion(Element filterElement, Element filteredElement, GraphicsNode filteredNode, BridgeContext ctx)
     Returns the filter region according to the x, y, width, height, dx, dy, dw, dh and filterUnits attributes.
public static  Rectangle2DconvertFilterPrimitiveRegion(Element filterPrimitiveElement, Element filteredElement, GraphicsNode filteredNode, Rectangle2D defaultRegion, Rectangle2D filterRegion, BridgeContext ctx)
     Returns the filter primitive region according to the x, y, width, height, and filterUnits attributes.
public static  float[]convertFilterRes(Element filterElement, BridgeContext ctx)
     Returns an array of 2 float numbers that describes the filter resolution of the specified filter element.
public static  floatconvertLength(String length, String attr, short unitsType, UnitProcessor.Context uctx)
     Returns a float in user units according to the specified parameters.
public static  Rectangle2DconvertMaskRegion(Element maskElement, Element maskedElement, GraphicsNode maskedNode, BridgeContext ctx)
     Returns the mask region according to the x, y, width, height, and maskUnits attributes.
public static  Rectangle2DconvertPatternRegion(Element patternElement, Element paintedElement, GraphicsNode paintedNode, BridgeContext ctx)
     Returns the pattern region according to the x, y, width, height, and patternUnits attributes.
public static  Point2DconvertPoint(String xStr, String xAttr, String yStr, String yAttr, short unitsType, UnitProcessor.Context uctx)
     Returns a Point2D in user units according to the specified parameters.
public static  floatconvertRatio(String v)
     Converts the specified ratio to float number.
protected static  Rectangle2DconvertRegion(String xStr, String yStr, String wStr, String hStr, short unitsType, GraphicsNode targetNode, UnitProcessor.Context uctx)
     Returns a rectangle that represents the region defined by the specified coordinates.
public static  intconvertSVGInteger(String s)
     Converts a string into an integer.
public static  floatconvertSVGNumber(String s)
     Converts a string into a float.
public static  float[]convertSVGNumberList(SVGNumberList l)
     Converts an SVGNumberList into a float array.
public static  Float[]convertSVGNumberOptionalNumber(Element elem, String attrName, String attrValue, BridgeContext ctx)
     This function parses attrValue for a number followed by an optional second Number.
public static  floatconvertSnapshotTime(Element e, BridgeContext ctx)
     Returns the value of the 'snapshotTime' attribute on the specified element as a float, or 0f if the attribute is missing or given as "none".
public static  AffineTransformconvertTransform(Element e, String attr, String transform, BridgeContext ctx)
     Returns an AffineTransform according to the specified parameters.
protected static  Rectangle2DextendRegion(String dxStr, String dyStr, String dwStr, String dhStr, short unitsType, GraphicsNode filteredNode, Rectangle2D region, UnitProcessor.Context uctx)
     Returns a rectangle that represents the region extended by the specified differential coordinates.
public static  Rectangle2DgetBaseFilterPrimitiveRegion(Element filterPrimitiveElement, Element filteredElement, GraphicsNode filteredNode, Rectangle2D defaultRegion, BridgeContext ctx)
    
public static  StringgetChainableAttributeNS(Element element, String namespaceURI, String attrName, BridgeContext ctx)
     Returns the value of the specified attribute specified on the specified element or one of its ancestor.
public static  StringgetDescription(SVGElement elt)
     Returns the content of the 'desc' child of the given element.
public static  ElementgetParentElement(Element elt)
     Returns the logical parent element of the given element.
public static  booleanmatchUserAgent(Element elt, UserAgent ua)
     Tests whether or not the given element match a specified user agent.
protected static  booleanmatchUserLanguage(String s, String userLanguages)
     Tests whether or not the specified language specification matches the user preferences.
public static  shortparseCoordinateSystem(Element e, String attr, String coordinateSystem, BridgeContext ctx)
     Parses the specified coordinate system defined by the specified element.
public static  shortparseMarkerCoordinateSystem(Element e, String attr, String coordinateSystem, BridgeContext ctx)
     Parses the specified coordinate system defined by the specified marker element.
public static  AffineTransformtoObjectBBox(AffineTransform Tx, GraphicsNode node)
     Returns an AffineTransform to move to the objectBoundingBox coordinate system.
public static  Rectangle2DtoObjectBBox(Rectangle2D r, GraphicsNode node)
     Returns the specified a Rectangle2D move to the objectBoundingBox coordinate system of the specified graphics node.

Field Detail
OBJECT_BOUNDING_BOX
final public static short OBJECT_BOUNDING_BOX(Code)
The objectBoundingBox coordinate system constants.



STROKE_WIDTH
final public static short STROKE_WIDTH(Code)
The strokeWidth coordinate system constants.



USER_SPACE_ON_USE
final public static short USER_SPACE_ON_USE(Code)
The userSpaceOnUse coordinate system constants.




Constructor Detail
SVGUtilities
protected SVGUtilities()(Code)
No instance of this class is required.




Method Detail
convertFilterChainRegion
public static Rectangle2D convertFilterChainRegion(Element filterElement, Element filteredElement, GraphicsNode filteredNode, BridgeContext ctx)(Code)
Returns the filter region according to the x, y, width, height, dx, dy, dw, dh and filterUnits attributes.
Parameters:
  filterElement - the filter element that defines the attributes
Parameters:
  filteredElement - the element referencing the filter
Parameters:
  filteredNode - the graphics node to filter (objectBoundingBox)
Parameters:
  ctx - the bridge context



convertFilterPrimitiveRegion
public static Rectangle2D convertFilterPrimitiveRegion(Element filterPrimitiveElement, Element filteredElement, GraphicsNode filteredNode, Rectangle2D defaultRegion, Rectangle2D filterRegion, BridgeContext ctx)(Code)
Returns the filter primitive region according to the x, y, width, height, and filterUnits attributes. Processing the element as the top one in the filter chain.
Parameters:
  filterPrimitiveElement - the filter primitive element
Parameters:
  filteredElement - the element referencing the filter
Parameters:
  filteredNode - the graphics node to use (objectBoundingBox)
Parameters:
  defaultRegion - the default region to filter
Parameters:
  filterRegion - the filter chain region
Parameters:
  ctx - the bridge context



convertFilterRes
public static float[] convertFilterRes(Element filterElement, BridgeContext ctx)(Code)
Returns an array of 2 float numbers that describes the filter resolution of the specified filter element.
Parameters:
  filterElement - the filter element
Parameters:
  ctx - the bridge context



convertLength
public static float convertLength(String length, String attr, short unitsType, UnitProcessor.Context uctx)(Code)
Returns a float in user units according to the specified parameters.
Parameters:
  length - the length
Parameters:
  attr - the name of the attribute that represents the length
Parameters:
  unitsType - the coordinate system (OBJECT_BOUNDING_BOX |USER_SPACE_ON_USE)
Parameters:
  uctx - the unit processor context



convertMaskRegion
public static Rectangle2D convertMaskRegion(Element maskElement, Element maskedElement, GraphicsNode maskedNode, BridgeContext ctx)(Code)
Returns the mask region according to the x, y, width, height, and maskUnits attributes.
Parameters:
  maskElement - the mask element that defines the various attributes
Parameters:
  maskedElement - the element referencing the mask
Parameters:
  maskedNode - the graphics node to mask (objectBoundingBox)
Parameters:
  ctx - the bridge context



convertPatternRegion
public static Rectangle2D convertPatternRegion(Element patternElement, Element paintedElement, GraphicsNode paintedNode, BridgeContext ctx)(Code)
Returns the pattern region according to the x, y, width, height, and patternUnits attributes.
Parameters:
  patternElement - the pattern element that defines the attributes
Parameters:
  paintedElement - the element referencing the pattern
Parameters:
  paintedNode - the graphics node to paint (objectBoundingBox)
Parameters:
  ctx - the bridge context



convertPoint
public static Point2D convertPoint(String xStr, String xAttr, String yStr, String yAttr, short unitsType, UnitProcessor.Context uctx)(Code)
Returns a Point2D in user units according to the specified parameters.
Parameters:
  xStr - the x coordinate
Parameters:
  xAttr - the name of the attribute that represents the x coordinate
Parameters:
  yStr - the y coordinate
Parameters:
  yAttr - the name of the attribute that represents the y coordinate
Parameters:
  unitsType - the coordinate system (OBJECT_BOUNDING_BOX |USER_SPACE_ON_USE)
Parameters:
  uctx - the unit processor context



convertRatio
public static float convertRatio(String v)(Code)
Converts the specified ratio to float number.
Parameters:
  v - the ratio value to convert
exception:
  NumberFormatException - if the ratio is not a validnumber or percentage



convertRegion
protected static Rectangle2D convertRegion(String xStr, String yStr, String wStr, String hStr, short unitsType, GraphicsNode targetNode, UnitProcessor.Context uctx)(Code)
Returns a rectangle that represents the region defined by the specified coordinates.
Parameters:
  xStr - the x coordinate of the region
Parameters:
  yStr - the y coordinate of the region
Parameters:
  wStr - the width of the region
Parameters:
  hStr - the height of the region
Parameters:
  targetNode - the graphics node (needed for objectBoundingBox)
Parameters:
  uctx - the unit processor context (needed for userSpaceOnUse)



convertSVGInteger
public static int convertSVGInteger(String s)(Code)
Converts a string into an integer.
Parameters:
  s - the integer representation to convert



convertSVGNumber
public static float convertSVGNumber(String s)(Code)
Converts a string into a float.
Parameters:
  s - the float representation to convert



convertSVGNumberList
public static float[] convertSVGNumberList(SVGNumberList l)(Code)
Converts an SVGNumberList into a float array.
Parameters:
  l - the list to convert



convertSVGNumberOptionalNumber
public static Float[] convertSVGNumberOptionalNumber(Element elem, String attrName, String attrValue, BridgeContext ctx)(Code)
This function parses attrValue for a number followed by an optional second Number. It always returns an array of two Floats. If either or both values are not provided the entries are set to null



convertSnapshotTime
public static float convertSnapshotTime(Element e, BridgeContext ctx)(Code)
Returns the value of the 'snapshotTime' attribute on the specified element as a float, or 0f if the attribute is missing or given as "none".
Parameters:
  e - the element from which to retrieve the 'snapshotTime' attribute
Parameters:
  ctx - the BridgeContext to use for error information



convertTransform
public static AffineTransform convertTransform(Element e, String attr, String transform, BridgeContext ctx)(Code)
Returns an AffineTransform according to the specified parameters.
Parameters:
  e - the element that defines the transform
Parameters:
  attr - the name of the attribute that represents the transform
Parameters:
  transform - the transform to parse
Parameters:
  ctx - the BridgeContext to use for error information



extendRegion
protected static Rectangle2D extendRegion(String dxStr, String dyStr, String dwStr, String dhStr, short unitsType, GraphicsNode filteredNode, Rectangle2D region, UnitProcessor.Context uctx)(Code)
Returns a rectangle that represents the region extended by the specified differential coordinates.
Parameters:
  dxStr - the differential x coordinate of the region
Parameters:
  dyStr - the differential y coordinate of the region
Parameters:
  dwStr - the differential width of the region
Parameters:
  dhStr - the differential height of the region
Parameters:
  unitsType - specifies whether the values are in userSpaceOnUseor objectBoundingBox space
Parameters:
  region - the region to extend
Parameters:
  uctx - the unit processor context (needed for userSpaceOnUse)



getBaseFilterPrimitiveRegion
public static Rectangle2D getBaseFilterPrimitiveRegion(Element filterPrimitiveElement, Element filteredElement, GraphicsNode filteredNode, Rectangle2D defaultRegion, BridgeContext ctx)(Code)



getChainableAttributeNS
public static String getChainableAttributeNS(Element element, String namespaceURI, String attrName, BridgeContext ctx)(Code)
Returns the value of the specified attribute specified on the specified element or one of its ancestor. Ancestors are found using the xlink:href attribute.
Parameters:
  element - the element to start with
Parameters:
  namespaceURI - the namespace URI of the attribute to return
Parameters:
  attrName - the name of the attribute to search
Parameters:
  ctx - the bridge context the value of the attribute or an empty string if not defined



getDescription
public static String getDescription(SVGElement elt)(Code)
Returns the content of the 'desc' child of the given element.



getParentElement
public static Element getParentElement(Element elt)(Code)
Returns the logical parent element of the given element. The parent element of a used element is the <use> element which reference it.



matchUserAgent
public static boolean matchUserAgent(Element elt, UserAgent ua)(Code)
Tests whether or not the given element match a specified user agent.
Parameters:
  elt - the element to check
Parameters:
  ua - the user agent



matchUserLanguage
protected static boolean matchUserLanguage(String s, String userLanguages)(Code)
Tests whether or not the specified language specification matches the user preferences.
Parameters:
  s - the langage to check
Parameters:
  userLanguages - the user langages



parseCoordinateSystem
public static short parseCoordinateSystem(Element e, String attr, String coordinateSystem, BridgeContext ctx)(Code)
Parses the specified coordinate system defined by the specified element.
Parameters:
  e - the element that defines the coordinate system
Parameters:
  attr - the attribute which contains the coordinate system
Parameters:
  coordinateSystem - the coordinate system to parse
Parameters:
  ctx - the BridgeContext to use for error information OBJECT_BOUNDING_BOX | USER_SPACE_ON_USE



parseMarkerCoordinateSystem
public static short parseMarkerCoordinateSystem(Element e, String attr, String coordinateSystem, BridgeContext ctx)(Code)
Parses the specified coordinate system defined by the specified marker element.
Parameters:
  e - the element that defines the coordinate system
Parameters:
  attr - the attribute which contains the coordinate system
Parameters:
  coordinateSystem - the coordinate system to parse
Parameters:
  ctx - the BridgeContext to use for error information STROKE_WIDTH | USER_SPACE_ON_USE



toObjectBBox
public static AffineTransform toObjectBBox(AffineTransform Tx, GraphicsNode node)(Code)
Returns an AffineTransform to move to the objectBoundingBox coordinate system.
Parameters:
  Tx - the original transformation
Parameters:
  node - the graphics node that defines the coordinatesystem to move into



toObjectBBox
public static Rectangle2D toObjectBBox(Rectangle2D r, GraphicsNode node)(Code)
Returns the specified a Rectangle2D move to the objectBoundingBox coordinate system of the specified graphics node.
Parameters:
  r - the original Rectangle2D
Parameters:
  node - the graphics node that defines the coordinatesystem to move into



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.