public static class WOWZSize.ScaledDimensions
extends java.lang.Object
WOWZSize frameSize = WOWZSize(640, 480); WOWZSize screenSize = WOWZSize(1920, 1080); WOWZSize.ScaledDimension croppedDimensions = frameSize.scaleAndCrop(screenSize);
Modifier and Type | Field and Description |
---|---|
WOWZPoint |
centerPoint
The center point of the destination rectangle.
|
WOWZSize |
destSize
The dimensions of the destination rectangle.
|
WOWZSize |
offset
The offset of the source rectangle in the destination.
|
WOWZSize |
scaledSize
The dimensions of the source rectangle after the appropriate placement calculation has been applied.
|
float |
scaleX
The scaling factor applied to the width of the source rectangle.
|
float |
scaleY
The scaling factor applied to the height of the source rectangle.
|
WOWZSize |
srcSize
The dimensions of the source rectangle.
|
Constructor and Description |
---|
ScaledDimensions(WOWZSize srcSize,
WOWZSize destSize)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
WOWZSize.ScaledDimensions |
center()
Calculates the offset of the source rectangle from the destination after centering it in the destination.
|
WOWZSize.ScaledDimensions |
scaleWithCrop()
Calculates the dimensions of the source rectangle after scaling such that it fits entirely in the destination rectangle, preserving the aspect ratio.
|
WOWZSize.ScaledDimensions |
scaleWithFill()
Calculates the dimensions of the source rectangle after scaling such that it fills the destination rectangle, preserving the aspect ratio.
|
void |
setDestSize(WOWZSize destSize)
Updates the dimensions of the destination rectangle.
|
void |
setSrcSize(WOWZSize srcSize)
Updates the dimensions of the source rectangle.
|
java.lang.String |
toString()
Gets a human-readable description of this instance.
|
public WOWZSize srcSize
public WOWZSize destSize
public WOWZSize scaledSize
public WOWZSize offset
public WOWZPoint centerPoint
public float scaleX
public float scaleY
public void setSrcSize(WOWZSize srcSize)
srcSize
- The dimensions of the source rectangle.public void setDestSize(WOWZSize destSize)
destSize
- The dimensions of the destination rectangle.public WOWZSize.ScaledDimensions scaleWithCrop()
public WOWZSize.ScaledDimensions scaleWithFill()
public WOWZSize.ScaledDimensions center()
public java.lang.String toString()
toString
in class java.lang.Object
© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal