public class VideoDrawtext extends VideoFilter
| Constructor and Description |
|---|
VideoDrawtext(String watermarkText,
Color fontColor) |
VideoDrawtext(String watermarkText,
int posX,
int posY,
String fontName,
File fontFile,
float fontSize,
Color fontColor) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAddArgument() |
Color |
getBorderColor() |
int |
getBorderWidth() |
int |
getBoxBorderWidth() |
Color |
getBoxColor() |
String |
getExpression() |
Color |
getFontColor() |
File |
getFontFile() |
String |
getFontName() |
float |
getFontSize() |
int |
getLineSpacing() |
int |
getPosX() |
int |
getPosY()
ignored if posX & posY are both -1
|
Color |
getShadowColor() |
int |
getShadowX() |
int |
getShadowY() |
String |
getWatermarkText() |
VideoDrawtext |
setAddArgument(String addArgument)
Add an additional argument to the command line
https://superuser.com/questions/939357/position-text-on-bottom-right-corner
Bottom right
x=w-tw:y=h-th
Bottom right with 10 pixel padding
x=w-tw-10:y=h-th-10
Top right
x=w-tw
Top right with 10 pixel padding
x=w-tw-10:y=10
Top left
x=0:y=0
Top left with 10 pixel padding
x=10:y=10
Bottom left
y=h-th
Bottom left with 10 pixel padding
x=10:h-th-10
centered
x=(w-text_w)/2:y=(h-text_h)/2
Can be used to speicfy other positions like "x=(w-text_w)/2:y=(h-text_h)/2"
for centered text water mark
|
VideoDrawtext |
setBorderColor(Color borderColor) |
VideoDrawtext |
setBorderWidth(int borderWidth) |
VideoDrawtext |
setBox(int borderWidth,
Color color) |
VideoDrawtext |
setBoxBorderWidth(int boxBorderWidth) |
VideoDrawtext |
setBoxColor(Color boxColor) |
VideoDrawtext |
setFontColor(Color fontColor) |
VideoDrawtext |
setFontFile(File fontFile) |
VideoDrawtext |
setFontName(String fontName) |
VideoDrawtext |
setFontSize(float fontSize) |
VideoDrawtext |
setLineSpacing(int lineSpacing) |
VideoDrawtext |
setPosX(int posX)
ignored if posX & posY are both -1
|
VideoDrawtext |
setPosY(int posY) |
VideoDrawtext |
setShadow(Color shadowColor,
int shadowX,
int shadowY) |
VideoDrawtext |
setShadowColor(Color shadowColor) |
VideoDrawtext |
setShadowX(int shadowX) |
VideoDrawtext |
setShadowY(int shadowY) |
VideoDrawtext |
setWatermarkText(String watermarkText) |
setExpression, toStringpublic VideoDrawtext(String watermarkText, Color fontColor) throws IllegalArgumentException
watermarkText - Text to be used as watermarkfontColor - Color of fontIllegalArgumentExceptionpublic VideoDrawtext(String watermarkText, int posX, int posY, String fontName, File fontFile, float fontSize, Color fontColor) throws IllegalArgumentException
watermarkText - Text to be used as watermarkposX - X Position of watermark text (From the left) ignored if posX & posY are both -1posY - Y Position of watermark text (From the top) ignored if posX & posY are both -1fontName - Use this font (Can be null, but then we need a fontFile)fontFile - Truetype font file (Only required when fontName is NULL)fontSize - Font sizefontColor - Color of fontIllegalArgumentExceptionpublic VideoDrawtext setShadow(Color shadowColor, int shadowX, int shadowY)
shadowColor - Color of shadowshadowX - X Position of shadow, relative to textshadowY - Y Position of shadow, relative to textpublic String getWatermarkText()
public VideoDrawtext setWatermarkText(String watermarkText)
watermarkText - the watermarkText to setpublic int getPosX()
public VideoDrawtext setPosX(int posX)
posX - the posX to setpublic int getPosY()
public VideoDrawtext setPosY(int posY)
posY - the posY to setpublic String getFontName()
public VideoDrawtext setFontName(String fontName)
fontName - the fontName to setpublic File getFontFile()
public VideoDrawtext setFontFile(File fontFile)
fontFile - the fontFile to setpublic float getFontSize()
public VideoDrawtext setFontSize(float fontSize)
fontSize - the fontSize to setpublic Color getFontColor()
public VideoDrawtext setFontColor(Color fontColor)
fontColor - the fontColor to setpublic Color getShadowColor()
public VideoDrawtext setShadowColor(Color shadowColor)
shadowColor - the shadowColor to setpublic int getShadowX()
public VideoDrawtext setShadowX(int shadowX)
shadowX - the shadowX to setpublic int getShadowY()
public VideoDrawtext setShadowY(int shadowY)
shadowY - the shadowY to setpublic VideoDrawtext setBox(int borderWidth, Color color)
public int getBoxBorderWidth()
public VideoDrawtext setBoxBorderWidth(int boxBorderWidth)
boxBorderWidth - the boxBorderWidth to setpublic Color getBoxColor()
public VideoDrawtext setBoxColor(Color boxColor)
boxColor - the boxColor to setpublic int getBorderWidth()
public VideoDrawtext setBorderWidth(int borderWidth)
borderWidth - the borderWidth to setpublic Color getBorderColor()
public VideoDrawtext setBorderColor(Color borderColor)
borderColor - the borderColor to setpublic int getLineSpacing()
public VideoDrawtext setLineSpacing(int lineSpacing)
lineSpacing - the lineSpacing to setpublic String getAddArgument()
public VideoDrawtext setAddArgument(String addArgument)
addArgument - the addArgument to setpublic String getExpression()
getExpression in class VideoFilterCopyright © 2020. All rights reserved.