Initializes a new instance of the [Margins](../../com.groupdocs.watermark.watermarks/margins) class with the specified type, location and size.
Parameters:
Parameter
Type
Description
marginType
int
The [MarginType](../../com.groupdocs.watermark.watermarks/margintype). Specifies how margin values should be interpreted.
left
double
The left margin value.
right
double
The right margin value.
top
double
The top margin value.
bottom
double
The bottom margin value.
getMarginType()
public final int getMarginType()
Gets [MarginType](../../com.groupdocs.watermark.watermarks/margintype). Setting a new value to this property automatically returns all margins to their default values (zero).
The default value is [MarginType.Absolute](../../com.groupdocs.watermark.watermarks/margintype#Absolute)
Returns:
int - The value specifying how margins should be interpreted.
setMarginType(int value)
public final void setMarginType(int value)
Sets [MarginType](../../com.groupdocs.watermark.watermarks/margintype). Setting a new value to this property automatically returns all margins to their default values (zero).
The default value is [MarginType.Absolute](../../com.groupdocs.watermark.watermarks/margintype#Absolute)
Parameters:
Parameter
Type
Description
value
int
The value specifying how margins should be interpreted.
getLeft()
public final double getLeft()
Gets the left margin.
Returns:
double - Horizontal offset from parent left border.
setLeft(double value)
public final void setLeft(double value)
Sets the left margin.
Parameters:
Parameter
Type
Description
value
double
Horizontal offset from parent left border.
getRight()
public final double getRight()
Gets the right margin.
Returns:
double - Horizontal offset from parent right border.
setRight(double value)
public final void setRight(double value)
Sets the right margin.
Parameters:
Parameter
Type
Description
value
double
Horizontal offset from parent right border.
getTop()
public final double getTop()
Gets the top margin.
Returns:
double - Horizontal offset from parent top border.
setTop(double value)
public final void setTop(double value)
Sets the top margin.
Parameters:
Parameter
Type
Description
value
double
Horizontal offset from parent top border.
getBottom()
public final double getBottom()
Gets the bottom margin.
Returns:
double - Horizontal offset from parent bottom border.
setBottom(double value)
public final void setBottom(double value)
Sets the bottom margin.
Parameters:
Parameter
Type
Description
value
double
Horizontal offset from parent bottom border.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.