Class DrawableHelper
- java.lang.Object
-
- com.avaya.clientservices.collaboration.DrawableHelper
-
public final class DrawableHelper extends java.lang.ObjectDrawable helper class. Used internally by
WhiteboardRenderer.Client doesn't need to use/create object of this class.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_WHITEBOARD_HEIGHTstatic intDEFAULT_WHITEBOARD_WIDTH
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static android.graphics.BitmapcreateWhiteboard()Creates whiteboard bitmap.static android.graphics.BitmapcreateWhiteboard(int whiteboardWidth, int whiteboardHeight)Creates whiteboard bitmap.static voiddrawShape(android.graphics.Canvas canvas, AbstractShape abstractShape, boolean isPicked)Draws abstract shape on canvas and if it's picked than its alpha channel will be 50%.static floatgetLongestLineWidth(java.lang.String content, android.graphics.Paint paint)Calculates longest line width.static floatgetTextHeight(java.lang.String content, android.graphics.Paint paint)Calculates text height.static booleanisTouchOnAbstractShape(int x, int y, float clickRange, AbstractShape abstractShape)Calculates if x, y coordinates are on abstract shape.static booleanshapeWasMoved(AbstractShape shape)Calculates if abstract shape was moved before
-
-
-
Field Detail
-
DEFAULT_WHITEBOARD_WIDTH
public static final int DEFAULT_WHITEBOARD_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_WHITEBOARD_HEIGHT
public static final int DEFAULT_WHITEBOARD_HEIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
createWhiteboard
public static android.graphics.Bitmap createWhiteboard()
Creates whiteboard bitmap.- Returns:
- whiteboard bitmap.
-
createWhiteboard
public static android.graphics.Bitmap createWhiteboard(int whiteboardWidth, int whiteboardHeight)Creates whiteboard bitmap.- Parameters:
whiteboardWidth- whiteboard widthwhiteboardHeight- whiteboard height- Returns:
- whiteboard bitmap.
-
drawShape
public static void drawShape(android.graphics.Canvas canvas, AbstractShape abstractShape, boolean isPicked)Draws abstract shape on canvas and if it's picked than its alpha channel will be 50%.- Parameters:
canvas- canvas to draw on.abstractShape- abstractShape object.isPicked- is shape picked.
-
getTextHeight
public static float getTextHeight(java.lang.String content, android.graphics.Paint paint)Calculates text height.- Parameters:
content- text.paint- Paint object containing style and color information.- Returns:
- text height.
-
getLongestLineWidth
public static float getLongestLineWidth(java.lang.String content, android.graphics.Paint paint)Calculates longest line width.- Parameters:
content- text.paint- Paint object containing style and color information.- Returns:
- longest line width.
-
isTouchOnAbstractShape
public static boolean isTouchOnAbstractShape(int x, int y, float clickRange, AbstractShape abstractShape)Calculates if x, y coordinates are on abstract shape.- Parameters:
x- x coordinate.y- y coordinate.clickRange- coordinate detection range.abstractShape- abstractShape object.- Returns:
- true if if x, y coordinates are on abstract shape.
-
shapeWasMoved
public static boolean shapeWasMoved(AbstractShape shape)
Calculates if abstract shape was moved before- Parameters:
shape- abstractShape object.- Returns:
- true if abstract shape was moved before.
-
-