Package com.storedobject.svg
Class Svg.Anchor
java.lang.Object
com.storedobject.svg.Svg.Anchor
- All Implemented Interfaces:
Transformer
- Enclosing class:
Svg
Transformer for anchoring an SVG to another one.
- Author:
- Syam
-
Constructor Summary
ConstructorsConstructorDescriptionAnchor(Svg anchoredTo, DoubleSupplier computeX, DoubleSupplier computeY) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionTransform the SVG content.doubletransformHeight(double height) Transform the height.doubletransformWidth(double width) Transform the width.doubletransformX(double x) Transform the X coordinate.doubletransformY(double y) Transform the Y coordinate.
-
Constructor Details
-
Anchor
Constructor.- Parameters:
anchoredTo- SVG to anchor to.computeX- Supplier for X coordinate.computeY- Supplier for Y coordinate.
-
-
Method Details
-
transformWidth
public double transformWidth(double width) Description copied from interface:TransformerTransform the width.- Specified by:
transformWidthin interfaceTransformer- Parameters:
width- Width.- Returns:
- Transformed width.
-
transformHeight
public double transformHeight(double height) Description copied from interface:TransformerTransform the height.- Specified by:
transformHeightin interfaceTransformer- Parameters:
height- Height.- Returns:
- Transformed height.
-
transformX
public double transformX(double x) Description copied from interface:TransformerTransform the X coordinate.- Specified by:
transformXin interfaceTransformer- Parameters:
x- X coordinate.- Returns:
- Transformed X coordinate.
-
transformY
public double transformY(double y) Description copied from interface:TransformerTransform the Y coordinate.- Specified by:
transformYin interfaceTransformer- Parameters:
y- Y coordinate.- Returns:
- Transformed Y coordinate.
-
transform
Description copied from interface:TransformerTransform the SVG content.- Specified by:
transformin interfaceTransformer- Parameters:
svg- SVG content.- Returns:
- Transformed SVG content.
-