public class Caption extends Object
The text caption shown in the barcode image. There are two captions: CaptionBelow and CaptionAbove
Constructor and Description |
---|
Caption()
Initializes a new instance of the
Caption class with default vaule. |
Caption(String text)
Initializes a new instance of the
Caption class with specified text. |
Caption(String text,
boolean visible,
int alignment,
float space,
Color color,
Font font) |
Modifier and Type | Method and Description |
---|---|
Caption |
copy()
Get a new copy of the caption instance.
|
void |
dispose()
Dispose the Caption instance
|
Font |
getFont() |
Color |
getForeColor() |
float |
getSpace()
Gets or sets the space between the caption and the barcode,
and the space between border and the caption
|
String |
getText()
Gets or sets the content of the caption.
|
int |
getTextAlign()
Gets or sets the text
System.Drawing.StringAlignmentalignment of the caption. |
boolean |
getVisible()
Gets or sets a value indicates whether the
Captioncaption is visible. |
void |
setFont(Font value) |
void |
setForeColor(Color value) |
void |
setSpace(float value) |
void |
setText(String value) |
void |
setTextAlign(int value) |
void |
setVisible(boolean value) |
public Caption()
Initializes a new instance of the Caption
class with default vaule.
public Caption(String text)
Initializes a new instance of the Caption
class with specified text.
text
- The text content of the caption objectpublic Caption copy()
Get a new copy of the caption instance.
public boolean getVisible()
Gets or sets a value indicates whether the Captioncaption
is visible.
public void setVisible(boolean value)
public Color getForeColor()
public void setForeColor(Color value)
public Font getFont()
public void setFont(Font value)
public float getSpace()
Gets or sets the space between the caption and the barcode, and the space between border and the caption
com.aspose.ms.System.ArgumentException
- <p>The <b>Space</b> parameter value is less than 0.</p>
<b>space</b>
for the caption is indicated by the System.Drawing.GraphicsUnitGraphicsUnit
.
public void setSpace(float value)
public int getTextAlign()
Gets or sets the text System.Drawing.StringAlignmentalignment
of the caption.
e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left
public void setTextAlign(int value)
public String getText()
Gets or sets the content of the caption.
public void setText(String value)
public void dispose()
Dispose the Caption instance
Copyright (c) 2002-2014 Aspose Pty Ltd. All Rights Reserved.