Package com.helger.css.utils
Class CSSRectHelper
java.lang.Object
com.helger.css.utils.CSSRectHelper
Provides rectangle handling sanity methods.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic CSSRectInterpret the passed value as a CSS rectangle and convert it to aCSSRect.static String[]getRectValues(String sCSSValue) Get all the values from within a CSS rectangle definition.static booleanisRectValue(String sCSSValue) Check if the passed value is CSS rectangle definition or not.
-
Method Details
-
isRectValue
Check if the passed value is CSS rectangle definition or not. It checks both the current syntax (rect(a,b,c,d)) and the old syntax (rect(a b c d)).- Parameters:
sCSSValue- The value to check. May benull.- Returns:
trueif the passed value is a rect value,falseif not
-
getRectValues
Get all the values from within a CSS rectangle definition.- Parameters:
sCSSValue- The CSS values to check. May benull.- Returns:
nullif the passed String is not a CSS rectangle. An array with 4 Strings if the passed value is a CSS rectangle.
-
getAsRect
Interpret the passed value as a CSS rectangle and convert it to aCSSRect.- Parameters:
sCSSValue- The CSS values to check. May benull.- Returns:
nullif the passed String is not a CSS rectangle.
-