public class RotationMinMaxWidth extends MinMaxWidth
Constructor and Description |
---|
RotationMinMaxWidth(double minWidth,
double maxWidth,
double minWidthOrigin,
double maxWidthOrigin,
double minWidthHeight,
double maxWidthHeight)
Create new instance
|
Modifier and Type | Method and Description |
---|---|
static RotationMinMaxWidth |
calculate(double angle,
double area,
MinMaxWidth elementMinMaxWidth)
Heuristic method, based on the assumption that area of element stays the same, when we try to
layout it with different available width (available width is between min-width and max-width).
|
static RotationMinMaxWidth |
calculate(double angle,
double area,
MinMaxWidth elementMinMaxWidth,
double availableWidth)
Heuristic method, based on the assumption that area of element stays the same, when we try to
layout it with different available width (available width is between min-width and max-width).
|
static double |
calculateRotatedWidth(Rectangle area,
double angle)
Utility method for calculating rotated width of area in a similar way to other calculations in this class.
|
double |
getMaxWidthHeight() |
double |
getMaxWidthOrigin() |
double |
getMinWidthHeight() |
double |
getMinWidthOrigin() |
getAdditionalWidth, getAvailableWidth, getChildrenMaxWidth, getChildrenMinWidth, getMaxWidth, getMinWidth, setAdditionalWidth, setChildrenMaxWidth, setChildrenMinWidth, toString
public RotationMinMaxWidth(double minWidth, double maxWidth, double minWidthOrigin, double maxWidthOrigin, double minWidthHeight, double maxWidthHeight)
minWidth
- min-width of rotated elementmaxWidth
- max-width of rotated elementminWidthOrigin
- the width of not rotated element, that will have min-width after rotationmaxWidthOrigin
- the width of not rotated element, that will have max-width after rotationminWidthHeight
- the height of rotated element, that have min-width as its rotated widthmaxWidthHeight
- the height of rotated element, that have min-width as its rotated widthpublic double getMinWidthOrigin()
public double getMaxWidthOrigin()
public double getMinWidthHeight()
public double getMaxWidthHeight()
public static RotationMinMaxWidth calculate(double angle, double area, MinMaxWidth elementMinMaxWidth)
angle
- rotation angle in radiansarea
- the constant areaelementMinMaxWidth
- NOT rotated element min-max-widthpublic static RotationMinMaxWidth calculate(double angle, double area, MinMaxWidth elementMinMaxWidth, double availableWidth)
angle
- rotation angle in radiansarea
- the constant areaelementMinMaxWidth
- NOT rotated element min-max-widthavailableWidth
- the maximum width of area the element will occupy after rotation.public static double calculateRotatedWidth(Rectangle area, double angle)
area
- the initial areaangle
- the rotation angle in radiansCopyright © 1998–2017 iText Group NV. All rights reserved.