|
JSR-927 (Maintenance Release) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.tv.media.AWTVideoSize
AWTVideoSize
is a data holder that represents the
position, scaling, and clipping of a JMF Player, as controlled via
an AWTVideoSizeControl. All coordinates are expressed in the same
coordinate space as AWT components. Because background video might
be larger than the addressable AWT area, some of the positions
might be negative.
An AWTVideoSize represents a transformation of video where the video is first positioned, then scaled, and then clipped. A rectangle (in the screen's coordinate system) of the source video is translated, scaled and clipped to fit within a rectangle specified in the screen's coordinate system.
AWTVideoSizeControl
Constructor Summary | |
AWTVideoSize(java.awt.Rectangle source,
java.awt.Rectangle dest)
Constructs a new AWTVideoSize instance. |
Method Summary | |
boolean |
equals(java.lang.Object other)
Compares this AWTVideoSize with the given object
for equality. |
java.awt.Rectangle |
getDestination()
Return a copy of the rectangle representing where the video is to be displayed, in the coordinate system of the screen. |
java.awt.Rectangle |
getSource()
Return a copy of the rectangle representing the portion of the source video to display, in the coordinate system of the screen. |
float |
getXScale()
Give the scaling factor applied to the video in the horizontal dimension, i.e., getDestination().width / getSource().width . |
float |
getYScale()
Give the scaling factor applied to the video in the vertical dimension, i.e., getDestination().height / getSource().height . |
int |
hashCode()
Generates a hash code value for this AWTVideoSize . |
java.lang.String |
toString()
Returns a string representation of this AWTVideoSize and its values. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AWTVideoSize(java.awt.Rectangle source, java.awt.Rectangle dest)
AWTVideoSize
instance. This
AWTVideoSize
represents a transformation where the
rectangle source
in the source video is scaled and
clipped to be within the rectangle dest
.
The instance of AWTVideoSize created with this constructor will not maintain a reference to either of the constructor's parameters.
source
- The rectangle representing the portion of the source
video to display, in the coordinate system of the screen.dest
- The rectangle representing where the video is to be
displayed, in the coordinate system of the screen.Method Detail |
public java.awt.Rectangle getSource()
Rectangle
.public java.awt.Rectangle getDestination()
Rectangle
.public float getXScale()
getDestination().width / getSource().width
.
public float getYScale()
getDestination().height / getSource().height
.
public int hashCode()
AWTVideoSize
.
Two AWTVideoSize
instances for which
AWTVideoSize.equals()
is true
will
have identical hash code values.
AWTVideoSize
.public boolean equals(java.lang.Object other)
AWTVideoSize
with the given object
for equality. Returns true
if and only if the
given object is also of type AWTVideoSize
and
contains data members equal to those of this
AWTVideoSize
.
other
- The object with which to test for equality.
true
if the two AWTVideoSize instances are
equal; false
otherwise.public java.lang.String toString()
AWTVideoSize
and its values.
|
JSR-927 (Maintenance Release) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |