Used in place of element.getFloatAttribute(a) because we can have a unit suffix (length or coordinate). @param element what to parse @param attribute name of the attribute to get @param relativeTo (float) Used for %. When relative to viewbox, should be svgWidth for horizontal dimentions, svgHeigh
(XML element, String attribute, float relativeTo)
| 1433 | * @return unit-parsed version of the data |
| 1434 | */ |
| 1435 | static protected float getFloatWithUnit(XML element, String attribute, float relativeTo) { |
| 1436 | String val = element.getString(attribute); |
| 1437 | return (val == null) ? 0 : parseUnitSize(val, relativeTo); |
| 1438 | } |
| 1439 | |
| 1440 | |
| 1441 | /** |
no test coverage detected