public class Margins extends Object
Specifies the margins of a barcode image.
This class is used to manipulate margins in barcode image.
Note: The actual amount of the margins are determined by the specified mesure System.Drawing.GraphicsUnitunit of the barcode image.
Margins.LeftLeft, Margins.RightRight}, Margins.TopTop, and Margins.BottomBottom} are properties that define the margins.
Margins.EqualsEquals determines if another object is equal to a Margins object.
Modifier and Type | Class and Description |
---|---|
class |
Margins.MarginFEventHandler |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determines whether two Margins} instances are equal.
|
int |
getBottom()
Gets the bottom marign.
|
int |
getLeft()
Gets the left margin.
|
int |
getRight()
Gets the right margin.
|
int |
getTop()
Gets the top marign.
|
int |
hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
|
void |
set(int margin)
Sets the specified margin for all sides.
|
void |
set(int left,
int right,
int top,
int bottom)
Sets the specified margins.
|
void |
setBottom(int value)
Sets the bottom marign.
|
void |
setLeft(int value)
Sets the left margin.
|
void |
setRight(int value)
Sets the right margin.
|
void |
setTop(int value)
Sets the top marign.
|
String |
toString()
Returns a String that represents the current MarginsMargins} instance.
|
public void set(int margin)
Sets the specified margin for all sides.
margin
- The margin for all sides.public void set(int left, int right, int top, int bottom)
Sets the specified margins.
left
- The left side.right
- The right side.top
- The top side.bottom
- The bottom side.public boolean equals(Object obj)
Determines whether two Margins} instances are equal.
public int hashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public String toString()
Returns a String that represents the current MarginsMargins} instance.
public int getBottom()
Gets the bottom marign.
com.aspose.ms.System.ArgumentException
- The bottom parameter value is less than 0.
public void setBottom(int value)
Sets the bottom marign.
com.aspose.ms.System.ArgumentException
- The bottom parameter value is less than 0.
public int getLeft()
Gets the left margin.
com.aspose.ms.System.ArgumentException
- The Left parameter value is less than 0.
public void setLeft(int value)
Sets the left margin.
com.aspose.ms.System.ArgumentException
- The Left parameter value is less than 0.
public int getRight()
Gets the right margin.
com.aspose.ms.System.ArgumentException
- The Right parameter value is less than 0.
public void setRight(int value)
Sets the right margin.
com.aspose.ms.System.ArgumentException
- The Right parameter value is less than 0.
public int getTop()
Gets the top marign.
com.aspose.ms.System.ArgumentException
- The Top parameter value is less than 0.
public void setTop(int value)
Sets the top marign.
com.aspose.ms.System.ArgumentException
- The Top parameter value is less than 0.
Copyright (c) 2002-2015 Aspose Pty Ltd. All Rights Reserved.