org.jhotdraw.samples.svg.io
Class SVGInputFormat.Viewport

java.lang.Object
  extended by org.jhotdraw.samples.svg.io.SVGInputFormat.Viewport
Enclosing class:
SVGInputFormat

private static class SVGInputFormat.Viewport
extends java.lang.Object

Each SVG element establishes a new Viewport.


Field Summary
private  java.util.HashMap<AttributeKey,java.lang.Object> attributes
           
 double height
          The height of the Viewport.
 double heightPercentFactor
          Factor for percent values relative to Viewport height.
 boolean isPreserveAspectRatio
          http://www.w3.org/TR/SVGMobile12/coords.html#PreserveAspectRatioAttribute XXX - use a more sophisticated variable here
 double numberFactor
          Factor for number values in the user coordinate system.
 java.awt.geom.Rectangle2D.Double viewBox
          The viewBox specifies the coordinate system within the Viewport.
 double width
          The width of the Viewport.
 double widthPercentFactor
          Factor for percent values relative to Viewport width.
 
Constructor Summary
private SVGInputFormat.Viewport()
           
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

public double width
The width of the Viewport.


height

public double height
The height of the Viewport.


viewBox

public java.awt.geom.Rectangle2D.Double viewBox
The viewBox specifies the coordinate system within the Viewport.


widthPercentFactor

public double widthPercentFactor
Factor for percent values relative to Viewport width.


heightPercentFactor

public double heightPercentFactor
Factor for percent values relative to Viewport height.


numberFactor

public double numberFactor
Factor for number values in the user coordinate system. This is the smaller value of width / viewBox.width and height / viewBox.height.


isPreserveAspectRatio

public boolean isPreserveAspectRatio
http://www.w3.org/TR/SVGMobile12/coords.html#PreserveAspectRatioAttribute XXX - use a more sophisticated variable here


attributes

private java.util.HashMap<AttributeKey,java.lang.Object> attributes
Constructor Detail

SVGInputFormat.Viewport

private SVGInputFormat.Viewport()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object