Package com.storedobject.svg
Class Svg.Scale
java.lang.Object
com.storedobject.svg.Svg.Scale
- All Implemented Interfaces:
Transformer
- Enclosing class:
Svg
Transformer for scaling by factors.
- Author:
- Syam
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTransform the SVG content.doubletransformHeight(double height) Transform the height.doubletransformWidth(double width) Transform the width.protected Stringx()Returns X coordinate as string.protected StringxReverse()Returns negative X coordinate as string.protected Stringy()Returns Y coordinate as string.protected StringyReverse()Returns negative Y coordinate as string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.svg.Transformer
transformX, transformY
-
Field Details
-
svg
Represents the SVG instance associated with the scale transformation. This variable provides access to the SVG data needed for coordinate transformations and scaling operations. It is initialized through the constructor of the containing class.
-
-
Constructor Details
-
Scale
Constructor.- Parameters:
svg- SVG to scale.scaleX- X scale factor.scaleY- Y scale factor.
-
-
Method Details
-
transformWidth
public double transformWidth(double width) Description copied from interface:TransformerTransform the width.- Parameters:
width- Width.- Returns:
- Transformed width.
-
transformHeight
public double transformHeight(double height) Description copied from interface:TransformerTransform the height.- Parameters:
height- Height.- Returns:
- Transformed height.
-
transform
Description copied from interface:TransformerTransform the SVG content.- Parameters:
svg- SVG content.- Returns:
- Transformed SVG content.
-
x
-
y
-
xReverse
Returns negative X coordinate as string.- Returns:
- Negative X coordinate.
-
yReverse
Returns negative Y coordinate as string.- Returns:
- Negative Y coordinate.
-