* order top, right, bottom, left.
*
* @param e the element with the 'clip' property
*/
public static float[] convertClip(Element e) {
Value v = getComputedStyle(e, SVGCSSEngine.CLIP_INDEX);
switch (v.getPrimitiveType()) {
case CSSPrimitiveValue.CSS_RECT:
float [] off = new float[4];
off[0] = v.getTop().getFloatValue();
off[1] = v.getRight().getFloatValue();
off[2] = v.getBottom().getFloatValue();
off[3] = v.getLeft().getFloatValue();
return off;
case CSSPrimitiveValue.CSS_IDENT:
return null; // 'auto' means no offsets
default:
throw new Error(); // can't be reached