public class WhiteboardShapeImage extends WhiteboardShape implements WhiteboardObjectImage
NAME
Constructor and Description |
---|
WhiteboardShapeImage(java.lang.String id,
WhiteboardPoint p,
double width,
double height,
byte[] bytes)
WhiteboardShapImage constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.awt.geom.Point2D p)
Tests if the shape contains a point.
|
byte[] |
getBackgroundImage()
Returns a binary array containing the image that should be displayed as
the background of this WhiteboardObject.
|
double |
getHeight()
Returns the height (in pixels) of the WhiteboardObject.
|
WhiteboardPoint |
getSelectionPoint(java.awt.geom.Point2D p)
Tests if a point p is over a selection point.
|
java.util.List<WhiteboardPoint> |
getSelectionPoints()
Returns the list of selected points.
|
WhiteboardPoint |
getWhiteboardPoint()
Returns the coordinates of this whiteboard object.
|
double |
getWidth()
Returns the width (in pixels) of the WhiteboardObject.
|
void |
paintShape(java.awt.Graphics2D g,
java.awt.geom.AffineTransform t)
Code to paint this specific shape.
|
void |
setBackgroundImage(byte[] background)
Specifies an image that should be displayed as the background of this
object.
|
void |
setHeight(double height)
Sets the width (in pixels) of the WhiteboardObject.
|
void |
setWhiteboardPoint(WhiteboardPoint whiteboardPoint)
Sets the coordinates of this whiteboard object.
|
void |
setWidth(double width)
Sets the width (in pixels) of the WhiteboardObject.
|
void |
translate(double deltaX,
double deltaY)
Translates the shape.
|
void |
translateSelectedPoint(double deltaX,
double deltaY)
Translates a point from the shape.
|
drawSelectedPoint, equals, getColor, getID, getModifyPoint, getOpacity, getThickness, isSelected, paint, preselect, select, setColor, setColor, setID, setModifyPoint, setOpacity, setSelected, setThickness
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColor, getID, getThickness, setColor, setThickness
public WhiteboardShapeImage(java.lang.String id, WhiteboardPoint p, double width, double height, byte[] bytes)
id
- String that uniquely identifies this WhiteboardObject.p
- coordinates of this object.width
- width value of this object (in pixel)height
- height value of this object (in pixel)bytes
- a binary array containing the image that should be
displayed as the object background.public void paintShape(java.awt.Graphics2D g, java.awt.geom.AffineTransform t)
paintShape
in class WhiteboardShape
g
- graphics contextt
- 2D affine transformpublic java.util.List<WhiteboardPoint> getSelectionPoints()
getSelectionPoints
in class WhiteboardShape
public boolean contains(java.awt.geom.Point2D p)
contains
in class WhiteboardShape
p
- coord pointpublic double getWidth()
getWidth
in interface WhiteboardObjectImage
public void setWidth(double width)
setWidth
in interface WhiteboardObjectImage
width
- The new width.public double getHeight()
getHeight
in interface WhiteboardObjectImage
public void setHeight(double height)
setHeight
in interface WhiteboardObjectImage
height
- The new height.public void translate(double deltaX, double deltaY)
translate
in class WhiteboardShape
deltaX
- x coorddeltaY
- y coordpublic void translateSelectedPoint(double deltaX, double deltaY)
translateSelectedPoint
in class WhiteboardShape
deltaX
- x coordinatedeltaY
- y coordinatepublic WhiteboardPoint getSelectionPoint(java.awt.geom.Point2D p)
getSelectionPoint
in class WhiteboardShape
p
- pointpublic WhiteboardPoint getWhiteboardPoint()
getWhiteboardPoint
in interface WhiteboardObjectImage
public void setWhiteboardPoint(WhiteboardPoint whiteboardPoint)
setWhiteboardPoint
in interface WhiteboardObjectImage
whiteboardPoint
- the coordinates of this object.public void setBackgroundImage(byte[] background)
setBackgroundImage
in interface WhiteboardObjectImage
background
- a binary array containing the image that should be
displayed as the object background.public byte[] getBackgroundImage()
getBackgroundImage
in interface WhiteboardObjectImage
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.