org.apache.batik.bridge
public abstract class ViewBox extends Object implements SVGConstants, ErrorConstants
Nested Class Summary | |
---|---|
protected static class | ViewBox.ViewHandler
This class can be used to store the value of the attribute viewBox or can
also be used to store the various attribute value that can be specified
on a SVG URI fragments. |
Constructor Summary | |
---|---|
protected | ViewBox()
No instance of this class is required. |
Method Summary | |
---|---|
static AffineTransform | getPreserveAspectRatioTransform(Element e, float w, float h)
Returns the transformation matrix to apply to initalize a viewport or
null if the specified viewBox disables the rendering of the element.
|
static AffineTransform | getPreserveAspectRatioTransform(Element e, float w, float h, BridgeContext ctx)
Returns the transformation matrix to apply to initalize a viewport or
null if the specified viewBox disables the rendering of the element.
|
static AffineTransform | getPreserveAspectRatioTransform(Element e, String viewBox, String aspectRatio, float w, float h, BridgeContext ctx)
Returns the transformation matrix to apply to initalize a viewport or
null if the specified viewBox disables the rendering of the element.
|
static AffineTransform | getPreserveAspectRatioTransform(Element e, float[] vb, float w, float h, BridgeContext ctx)
Returns the transformation matrix to apply to initalize a viewport or
null if the specified viewBox disables the rendering of the element.
|
static AffineTransform | getPreserveAspectRatioTransform(Element e, float[] vb, float w, float h, SVGAnimatedPreserveAspectRatio aPAR, BridgeContext ctx)
Returns the transformation matrix to apply to initalize a viewport or
null if the specified viewBox disables the rendering of the element.
|
static AffineTransform | getPreserveAspectRatioTransform(float[] vb, short align, boolean meet, float w, float h)
Returns the preserveAspectRatio transform according to the specified
parameters.
|
static AffineTransform | getViewTransform(String ref, Element e, float w, float h, BridgeContext ctx)
Parses the specified reference (from a URI) and returns the appropriate
transform.
|
static float[] | parseViewBoxAttribute(Element e, String value, BridgeContext ctx)
Parses a viewBox attribute.
|
Deprecated: Replaced by {@link #getPreserveAspectRatioTransform(Element,float,float,BridgeContext)}, which has more accurate error reporting.
Returns the transformation matrix to apply to initalize a viewport or null if the specified viewBox disables the rendering of the element.Parameters: e the element with a viewbox w the width of the effective viewport h The height of the effective viewport
Parameters: e the element with a viewbox w the width of the effective viewport h The height of the effective viewport ctx The BridgeContext to use for error information
Parameters: e the element with a viewbox viewBox the viewBox definition w the width of the effective viewport h The height of the effective viewport ctx The BridgeContext to use for error information
Parameters: e the element with a viewbox vb the viewBox definition as float w the width of the effective viewport h The height of the effective viewport ctx The BridgeContext to use for error information
Parameters: e the element with a viewbox vb the viewBox definition as float w the width of the effective viewport h The height of the effective viewport aPAR The animated preserveAspectRatio value ctx The BridgeContext to use for error information
Parameters: vb the viewBox definition align the alignment definition meet true means 'meet', false means 'slice' w the width of the region in which the document has to fit into h the height of the region in which the document has to fit into
Parameters: ref the reference of the URI that may specify additional attribute values such as the viewBox, preserveAspectRatio or a transform e the element interested in its view transform w the width of the effective viewport h The height of the effective viewport ctx The BridgeContext to use for error information
Throws: BridgeException if an error occured while computing the preserveAspectRatio transform
Parameters: e the element whose viewBox attribute value is being parsed value the viewBox ctx the BridgeContext to use for error information
Returns: The 4 viewbox components or null.