public class CPDFBackground
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CPDFBackground.CPDFBackgroundAlign |
static class |
CPDFBackground.Type |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes the background.
|
int |
getColor()
Gets the color of the background.
|
CPDFBackground.CPDFBackgroundAlign |
getHorizalign()
Gets the horizontal alignment of the background.
|
float |
getOpacity()
Gets the opacity of the background.
|
java.lang.String |
getPages()
Gets the page range of the background by string, such as "0,3 or 5-7".
|
float |
getRotation()
Gets the rotation angle of the background.
|
float |
getScale()
Gets the scale of the background.
|
CPDFBackground.Type |
getType()
Gets the type of the background.
|
CPDFBackground.CPDFBackgroundAlign |
getVertalign()
Gets the vertical alignment of the background.
|
float |
getXOffset()
Gets the horizontal offset of the background.
|
float |
getYOffset()
Gets the vertical offset of the background.
|
boolean |
isAllowsPrint()
Gets whether to support the background to be printed.
|
boolean |
isAllowsView()
Gets whether to support the background to be displayed.
|
boolean |
isValid()
Whether CPDFBackground is valid.
|
void |
release()
Release CPDFBackground object
|
boolean |
setAllowsPrint(boolean allow)
Sets whether to support the background to be printed.
|
boolean |
setAllowsView(boolean allow)
Sets whether to support the background to be displayed.
|
boolean |
setColor(int color)
Sets the color of the background.
|
boolean |
setHorizalign(CPDFBackground.CPDFBackgroundAlign align)
Sets the horizontal alignment of the background.
|
boolean |
setImage(android.graphics.Bitmap bitmap,
CPDFImageScaleType scaleType)
Sets the image of the background.
|
boolean |
setImage(java.lang.String imgPath,
java.lang.String maskPath,
CPDFImageScaleType scaleType)
Sets the image of the background.
|
boolean |
setOpacity(float opacity)
Sets the opacity of the background.
|
boolean |
setPages(java.lang.String pages)
Sets the page range of the background by string, such as "0,3 or 5-7".
|
boolean |
setRotation(float rotation)
Sets the rotation angle of the background.
|
boolean |
setScale(float scale)
Sets the scale of the background.
|
boolean |
setType(CPDFBackground.Type type)
Sets the type of the background.
|
boolean |
setVertalign(CPDFBackground.CPDFBackgroundAlign align)
Sets the vertical alignment of the background.
|
boolean |
setXOffset(float offset)
Sets the horizontal offset of the background.
|
boolean |
setYOffset(float offset)
Sets the vertical offset of the background.
|
void |
update()
Updates the background.
|
public CPDFBackground.Type getType()
public boolean setType(CPDFBackground.Type type)
type
- the type of the backgroundpublic float getOpacity()
public boolean setOpacity(float opacity)
opacity
- The opacity of the background.public float getScale()
public boolean setScale(float scale)
scale
- public float getRotation()
public boolean setRotation(float rotation)
rotation
- The rotationpublic CPDFBackground.CPDFBackgroundAlign getHorizalign()
public CPDFBackground.CPDFBackgroundAlign getVertalign()
public boolean setHorizalign(CPDFBackground.CPDFBackgroundAlign align)
align
- Horizontal alignmentpublic boolean setVertalign(CPDFBackground.CPDFBackgroundAlign align)
align
- Vertical alignmentpublic float getXOffset()
public float getYOffset()
public boolean setXOffset(float offset)
offset
- Horizontal offsetpublic boolean setYOffset(float offset)
offset
- Vertical offsetpublic boolean isAllowsView()
public boolean isAllowsPrint()
public boolean setAllowsView(boolean allow)
allow
- Whether to allow view.public boolean setAllowsPrint(boolean allow)
allow
- Whether to allow printing.public java.lang.String getPages()
public boolean setPages(java.lang.String pages)
pages
- page rangepublic boolean setImage(java.lang.String imgPath, java.lang.String maskPath, CPDFImageScaleType scaleType)
imgPath
- Image pathmaskPath
- Mask image pathscaleType
- Scale type ,see CPDFImageScaleType
public boolean setImage(android.graphics.Bitmap bitmap, CPDFImageScaleType scaleType)
bitmap
- Image bitmapscaleType
- Scale type ,see CPDFImageScaleType
public boolean setColor(int color)
color
- Color value (0x00000000~0xFFFFFFFF)public int getColor()
public void update()
public void clear()
public boolean isValid()
public void release()