Class RotationMinMaxWidth
- Namespace
- iText.Layout.Minmaxwidth
- Assembly
- itext.layout.dll
Class for min-max-width of rotated elements.
public class RotationMinMaxWidth : MinMaxWidth
- Inheritance
-
RotationMinMaxWidth
- Inherited Members
Remarks
Class for min-max-width of rotated elements. Also contains heuristic methods for it calculation 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).
Constructors
RotationMinMaxWidth(double, double, double, double, double, double)
Create new instance
public RotationMinMaxWidth(double minWidth, double maxWidth, double minWidthOrigin, double maxWidthOrigin, double minWidthHeight, double maxWidthHeight)
Parameters
minWidth
doublemin-width of rotated element
maxWidth
doublemax-width of rotated element
minWidthOrigin
doublethe width of not rotated element, that will have min-width after rotation
maxWidthOrigin
doublethe width of not rotated element, that will have max-width after rotation
minWidthHeight
doublethe height of rotated element, that have min-width as its rotated width
maxWidthHeight
doublethe height of rotated element, that have min-width as its rotated width
Methods
Calculate(double, double, MinMaxWidth)
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).
public static RotationMinMaxWidth Calculate(double angle, double area, MinMaxWidth elementMinMaxWidth)
Parameters
angle
doublerotation angle in radians
area
doublethe constant area
elementMinMaxWidth
MinMaxWidthNOT rotated element min-max-width
Returns
- RotationMinMaxWidth
possible min-max-width of element after rotation
Calculate(double, double, MinMaxWidth, double)
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).
public static RotationMinMaxWidth Calculate(double angle, double area, MinMaxWidth elementMinMaxWidth, double availableWidth)
Parameters
angle
doublerotation angle in radians
area
doublethe constant area
elementMinMaxWidth
MinMaxWidthNOT rotated element min-max-width
availableWidth
doublethe maximum width of area the element will occupy after rotation.
Returns
- RotationMinMaxWidth
possible min-max-width of element after rotation
CalculateRotatedWidth(Rectangle, double)
Utility method for calculating rotated width of area in a similar way to other calculations in this class.
public static double CalculateRotatedWidth(Rectangle area, double angle)
Parameters
Returns
- double
width of rotated area
GetMaxWidthHeight()
public virtual double GetMaxWidthHeight()
Returns
GetMaxWidthOrigin()
public virtual double GetMaxWidthOrigin()
Returns
GetMinWidthHeight()
public virtual double GetMinWidthHeight()
Returns
GetMinWidthOrigin()
public virtual double GetMinWidthOrigin()