public final class MaxLeadingAndSize extends Object
Constructor and Description |
---|
MaxLeadingAndSize() |
Modifier and Type | Method and Description |
---|---|
Float |
calculateLeading(Tag t)
Calculates the leading of the given tag.
|
float |
getLargestFont() |
float |
getLargestFontFromChildren(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 tag
public float getLargestFontFromChildren(List<Tag> children)
children
- Listpublic Float calculateLeading(Tag t)
t
- tag of which the leading has to be calculated.
Copyright © 2016. All rights reserved.