Package com.itextpdf.layout.renderer
Class FlexUtil.FlexItemCalculationInfo
java.lang.Object
com.itextpdf.layout.renderer.FlexUtil.FlexItemCalculationInfo
- Enclosing class:
FlexUtil
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) float
(package private) float
(package private) float
(package private) boolean
(package private) float
(package private) float
(package private) float
(package private) float
(package private) boolean
(package private) boolean
(package private) boolean
(package private) boolean
(package private) float
(package private) float
(package private) float
(package private) AbstractRenderer
(package private) float
(package private) float
(package private) float
-
Constructor Summary
ConstructorsConstructorDescriptionFlexItemCalculationInfo
(AbstractRenderer renderer, float flexBasis, float flexGrow, float flexShrink, float areaMainSize, boolean flexBasisContent, boolean isColumnDirection, float crossSize) -
Method Summary
Modifier and TypeMethodDescriptionprivate float
calculateContentSizeSuggestion
(float flexContainerMainSize, float crossSize) The content size suggestion is the min-content size in the main axis, clamped, if it has an aspect ratio, by any definite min and max cross size properties converted through the aspect ratio, and then further clamped by the max main size property if that is definite.private float
calculateMinContentAuto
(float flexContainerMainSize, float crossSize) private Float
calculateSpecifiedSizeSuggestion
(float flexContainerMainSize) If the item’s computed main size property is definite, then the specified size suggestion is that size (clamped by its max main size property if it’s definite).private Float
calculateTransferredSizeSuggestion
(float flexContainerMainSize) If the item has an intrinsic aspect ratio and its computed cross size property is definite, then the transferred size suggestion is that size (clamped by its min and max cross size properties if they are definite), converted through the aspect ratio.private float
clampValueByCrossSizesConvertedThroughAspectRatio
(float value, float flexContainerMainSize) (package private) float
getInnerCrossSize
(float size) (package private) float
getInnerMainSize
(float size) (package private) float
getOuterCrossSize
(float size) (package private) float
getOuterMainSize
(float size)
-
Field Details
-
renderer
AbstractRenderer renderer -
flexBasis
float flexBasis -
flexShrink
float flexShrink -
flexGrow
float flexGrow -
minContent
float minContent -
maxContent
float maxContent -
mainSize
float mainSize -
crossSize
float crossSize -
xShift
float xShift -
yShift
float yShift -
scaledFlexShrinkFactor
float scaledFlexShrinkFactor -
isFrozen
boolean isFrozen -
isMinViolated
boolean isMinViolated -
isMaxViolated
boolean isMaxViolated -
flexBaseSize
float flexBaseSize -
hypotheticalMainSize
float hypotheticalMainSize -
hypotheticalCrossSize
float hypotheticalCrossSize -
flexBasisContent
boolean flexBasisContent -
isColumnDirection
boolean isColumnDirection
-
-
Constructor Details
-
FlexItemCalculationInfo
public FlexItemCalculationInfo(AbstractRenderer renderer, float flexBasis, float flexGrow, float flexShrink, float areaMainSize, boolean flexBasisContent, boolean isColumnDirection, float crossSize)
-
-
Method Details
-
toRectangle
-
getOuterMainSize
float getOuterMainSize(float size) -
getInnerMainSize
float getInnerMainSize(float size) -
getOuterCrossSize
float getOuterCrossSize(float size) -
getInnerCrossSize
float getInnerCrossSize(float size) -
calculateMinContentAuto
private float calculateMinContentAuto(float flexContainerMainSize, float crossSize) -
calculateTransferredSizeSuggestion
If the item has an intrinsic aspect ratio and its computed cross size property is definite, then the transferred size suggestion is that size (clamped by its min and max cross size properties if they are definite), converted through the aspect ratio. It is otherwise undefined.- Returns:
- transferred size suggestion if it can be calculated, null otherwise
-
calculateSpecifiedSizeSuggestion
If the item’s computed main size property is definite, then the specified size suggestion is that size (clamped by its max main size property if it’s definite). It is otherwise undefined.- Parameters:
flexContainerMainSize
- the width of the flex container- Returns:
- specified size suggestion if it's definite, null otherwise
-
calculateContentSizeSuggestion
private float calculateContentSizeSuggestion(float flexContainerMainSize, float crossSize) The content size suggestion is the min-content size in the main axis, clamped, if it has an aspect ratio, by any definite min and max cross size properties converted through the aspect ratio, and then further clamped by the max main size property if that is definite.- Parameters:
flexContainerMainSize
- the width of the flex container- Returns:
- content size suggestion
-
clampValueByCrossSizesConvertedThroughAspectRatio
private float clampValueByCrossSizesConvertedThroughAspectRatio(float value, float flexContainerMainSize)
-