public class WOWZText
extends java.lang.Object
WOWZCameraView
.Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM
A position specifier to use as the second argument to
setPosition(int, int) to
align the text along the bottom of the display. |
static int |
CENTER
A position specifier to use with either argument of
setPosition(int, int) to
center the text in the device display. |
static int |
LEFT
A position specifier to use as the first argument of
setPosition(int, int) to
align the text along the left hand side of the display. |
static int |
RIGHT
A position specifier to use as the first argument to
setPosition(int, int) to
align the text along the right hand side of the display. |
static int |
TOP
A position specifier to use as the second argument to
setPosition(int, int) to
align the text along the top of the display. |
Modifier and Type | Method and Description |
---|---|
int |
getAlignment()
Gets the current position, in display pixels.
|
float |
getAscent()
Gets the scaled font ascent.
|
WOWZSize |
getBaseSize()
Gets the original (unscaled) size, in pixels, of the text being rendered.
|
float |
getCharHeight()
Gets the scaled character height, in pixels.
|
float |
getCharWidth(char chr)
Gets the scaled width, in pixels, of the specified character.
|
float |
getCharWidthMax()
Gets the scaled maximum character width, in pixels.
|
WOWZColor |
getColor() |
float |
getDescent()
Gets the scaled font descent.
|
WOWZTextManager.Font |
getFont() |
java.util.UUID |
getFontId() |
int |
getHeight()
Gets the scaled height of the text object.
|
WOWZPoint |
getPosition() |
int |
getRotationAngle()
Gets the current rotation angle, from 0 degrees to 360 degrees.
|
float |
getScale()
Gets the scale factor that's currently applied.
|
int |
getScaleBasis()
Gets the current method used to apply the scale factor.
|
WOWZSize |
getScaledSize()
Gets the scaled size of the rendered text object.
|
float |
getSpacing()
Gets the spacing between characters.
|
java.lang.String |
getText() |
int |
getWidth()
Gets the scaled width, in pixels, of the text object.
|
boolean |
isVisible()
Checks whether the bitmap is rendered (displayed).
|
void |
setAlignment(int alignment) |
void |
setColor(float r,
float g,
float b) |
void |
setColor(float r,
float g,
float b,
float a) |
void |
setColor(WOWZColor color) |
void |
setFontId(java.util.UUID fontId) |
void |
setPosition(int xpos,
int ypos)
Sets the bitmap's display position, in display pixels.
|
void |
setPosition(WOWZPoint position)
Sets the bitmap's display position, in display pixels.
|
void |
setRotationAngle(int angle)
Sets the bitmap's display rotation angle, from 0 degrees to 360 degrees.
|
void |
setScale(float scale)
Sets the display scale factor for the bitmap based on its original size.
|
void |
setScale(float scale,
int scaleBasis)
Sets the bitmap's display scale factor and scaling basis.
|
void |
setSpacing(float spacing)
Sets the spacing between characters.
|
void |
setText(java.lang.String text) |
void |
setVisible(boolean isVisible)
Sets a flag indicating whether the bitmap should be rendered (displayed).
|
public static final int CENTER
setPosition(int, int)
to
center the text in the device display.public static final int LEFT
setPosition(int, int)
to
align the text along the left hand side of the display.public static final int RIGHT
setPosition(int, int)
to
align the text along the right hand side of the display.public static final int TOP
setPosition(int, int)
to
align the text along the top of the display.public static final int BOTTOM
setPosition(int, int)
to
align the text along the bottom of the display.public java.lang.String getText()
public void setText(java.lang.String text)
public java.util.UUID getFontId()
public void setFontId(java.util.UUID fontId)
public WOWZTextManager.Font getFont()
public WOWZColor getColor()
public void setColor(WOWZColor color)
public void setColor(float r, float g, float b, float a)
public void setColor(float r, float g, float b)
public WOWZSize getBaseSize()
public WOWZSize getScaledSize()
public int getWidth()
public int getHeight()
public int getScaleBasis()
public float getScale()
public void setScale(float scale)
scale
- The scale factor.public void setScale(float scale, int scaleBasis)
scale
- The scale factor.scaleBasis
- The WOWZTextManager.SCALE_BASIS_FRAME_WIDTH
, WOWZTextManager.SCALE_BASIS_FRAME_HEIGHT
,
WOWZTextManager.SCALE_BASIS_BASE_SIZE
, or WOWZTextManager.SCALE_BASIS_CURRENT_SIZE
method.public float getSpacing()
public void setSpacing(float spacing)
spacing
- The size of the space between characters.public void setPosition(WOWZPoint position)
position
- The display position.public void setPosition(int xpos, int ypos)
xpos
- The x position.ypos
- The y position.public int getAlignment()
public void setAlignment(int alignment)
public int getRotationAngle()
public void setRotationAngle(int angle)
angle
- The angle of the display rotation.public void setVisible(boolean isVisible)
isVisible
- True if the bitmap should be rendered; false otherwise.public boolean isVisible()
public float getCharWidth(char chr)
chr
- The character whose width is to be returned.public float getCharWidthMax()
public float getCharHeight()
public float getAscent()
public float getDescent()
public WOWZPoint getPosition()
© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal