public final class MaxLeadingAndSize
extends java.lang.Object
Constructor | Description |
---|---|
MaxLeadingAndSize() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Float |
calculateLeading(Tag t) |
Calculates the leading of the given tag.
|
float |
getLargestFont() |
|
float |
getLargestFontFromChildren(java.util.List<Tag> children) |
Iterates over all children in a List and returns the largest font size found.
|
float |
getLargestLeading() |
|
void |
setLeading(Tag tag) |
Set the largest leading based on calculateLeading only.
|
void |
setVariablesBasedOnChildren(Tag t) |
Sets largest font size and largest leading based on the css styles "font-size" and "line-height" of a given tag and its children.
|
public float getLargestLeading()
public float getLargestFont()
public void setVariablesBasedOnChildren(Tag t)
t
- tag of which the variables need to be set.public void setLeading(Tag tag)
tag
- the tagpublic float getLargestFontFromChildren(java.util.List<Tag> children)
children
- Listpublic java.lang.Float calculateLeading(Tag t)
t
- tag of which the leading has to be calculated.Copyright © 1998–2018. All rights reserved.