/** * Method to get the transparent color information from a NodeInst. * * @param ni the NodeInst to examine. * @return an array of Color values. Returns null if no such data exists on the NodeInst. */ public static Color[] getTransparentColors(NodeInst ni) { int opt = Manipulate.getOptionOnNode(ni); if (opt != TECHTRANSPCOLORS) return null; Variable var = ni.getVar(TRANSLAYER_KEY); String transparentColorsStr = (String) var.getObject(); int colon = transparentColorsStr.indexOf(':'); if (colon >= 0) transparentColorsStr = transparentColorsStr.substring(colon + 1); if (var == null) return null; Color[] colors = TextUtils.getTransparentColors(transparentColorsStr); return colors; }