Package com.storedobject.svg
Class Svg.Margin
java.lang.Object
com.storedobject.svg.Svg.Margin
- All Implemented Interfaces:
Transformer
- Enclosing class:
Svg
Transformer for adding margins.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the margin.getSide()Get the side.voidsetMargin(double margin) Set the margin.voidSet the side.final StringTransform the SVG content.final doubletransformHeight(double height) Transform the height.final doubletransformWidth(double width) Transform the width.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
-
Constructor Details
-
Margin
public Margin(double margin) Constructor.- Parameters:
margin- Margin value.
-
Margin
Constructor.- Parameters:
margin- Margin value.side- Side.
-
-
Method Details
-
setSide
-
getSide
-
getMargin
public double getMargin()Get the margin.- Returns:
- Margin.
-
setMargin
public void setMargin(double margin) Set the margin.- Parameters:
margin- Margin.
-
transformWidth
public final double transformWidth(double width) Description copied from interface:TransformerTransform the width.- Specified by:
transformWidthin interfaceTransformer- Parameters:
width- Width.- Returns:
- Transformed width.
-
transformHeight
public final double transformHeight(double height) Description copied from interface:TransformerTransform the height.- Specified by:
transformHeightin interfaceTransformer- Parameters:
height- Height.- Returns:
- Transformed height.
-
transform
Description copied from interface:TransformerTransform the SVG content.- Specified by:
transformin interfaceTransformer- Parameters:
svg- SVG content.- Returns:
- Transformed SVG content.
-