Table of Contents

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 double

min-width of rotated element

maxWidth double

max-width of rotated element

minWidthOrigin double

the width of not rotated element, that will have min-width after rotation

maxWidthOrigin double

the width of not rotated element, that will have max-width after rotation

minWidthHeight double

the height of rotated element, that have min-width as its rotated width

maxWidthHeight double

the 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 double

rotation angle in radians

area double

the constant area

elementMinMaxWidth MinMaxWidth

NOT 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 double

rotation angle in radians

area double

the constant area

elementMinMaxWidth MinMaxWidth

NOT rotated element min-max-width

availableWidth double

the 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

area Rectangle

the initial area

angle double

the rotation angle in radians

Returns

double

width of rotated area

GetMaxWidthHeight()

public virtual double GetMaxWidthHeight()

Returns

double

GetMaxWidthOrigin()

public virtual double GetMaxWidthOrigin()

Returns

double

GetMinWidthHeight()

public virtual double GetMinWidthHeight()

Returns

double

GetMinWidthOrigin()

public virtual double GetMinWidthOrigin()

Returns

double