colorSpace = new ICCColorSpaceWithIntent(iccProfile, renderingIntent, profileName, iccProfileSrc);
/** * Analyzes the color-profile property and builds an ICCColorSpaceExt * object from it. * * @param element the element with the color-profile property * @param ctx the bridge context */ protected static ICCColorSpaceWithIntent extractColorSpace(Element element, BridgeContext ctx) { String colorProfileProperty = CSSUtilities.getComputedStyle (element, SVGCSSEngine.COLOR_PROFILE_INDEX).getStringValue(); // The only cases that need special handling are 'sRGB' and 'name' ICCColorSpaceWithIntent colorSpace = null; if (CSS_SRGB_VALUE.equalsIgnoreCase(colorProfileProperty)) { colorSpace = new ICCColorSpaceWithIntent (ICC_Profile.getInstance(ColorSpace.CS_sRGB), RenderingIntent.AUTO, "sRGB", null); } else if (!CSS_AUTO_VALUE.equalsIgnoreCase(colorProfileProperty) && !"".equalsIgnoreCase(colorProfileProperty)){ // The value is neither 'sRGB' nor 'auto': it is a profile name. SVGColorProfileElementBridge profileBridge = (SVGColorProfileElementBridge) ctx.getBridge (SVG_NAMESPACE_URI, SVG_COLOR_PROFILE_TAG); if (profileBridge != null) { colorSpace = profileBridge.createICCColorSpaceWithIntent (ctx, element, colorProfileProperty); } } return colorSpace; }
/** * Analyzes the color-profile property and builds an ICCColorSpaceExt * object from it. * * @param element the element with the color-profile property * @param ctx the bridge context */ protected static ICCColorSpaceWithIntent extractColorSpace(Element element, BridgeContext ctx) { String colorProfileProperty = CSSUtilities.getComputedStyle (element, SVGCSSEngine.COLOR_PROFILE_INDEX).getStringValue(); // The only cases that need special handling are 'sRGB' and 'name' ICCColorSpaceWithIntent colorSpace = null; if (CSS_SRGB_VALUE.equalsIgnoreCase(colorProfileProperty)) { colorSpace = new ICCColorSpaceWithIntent (ICC_Profile.getInstance(ColorSpace.CS_sRGB), RenderingIntent.AUTO, "sRGB", null); } else if (!CSS_AUTO_VALUE.equalsIgnoreCase(colorProfileProperty) && !"".equalsIgnoreCase(colorProfileProperty)){ // The value is neither 'sRGB' nor 'auto': it is a profile name. SVGColorProfileElementBridge profileBridge = (SVGColorProfileElementBridge) ctx.getBridge (SVG_NAMESPACE_URI, SVG_COLOR_PROFILE_TAG); if (profileBridge != null) { colorSpace = profileBridge.createICCColorSpaceWithIntent (ctx, element, colorProfileProperty); } } return colorSpace; }
/** * Analyzes the color-profile property and builds an ICCColorSpaceExt * object from it. * * @param element the element with the color-profile property * @param ctx the bridge context */ protected static ICCColorSpaceWithIntent extractColorSpace(Element element, BridgeContext ctx) { String colorProfileProperty = CSSUtilities.getComputedStyle (element, SVGCSSEngine.COLOR_PROFILE_INDEX).getStringValue(); // The only cases that need special handling are 'sRGB' and 'name' ICCColorSpaceWithIntent colorSpace = null; if (CSS_SRGB_VALUE.equalsIgnoreCase(colorProfileProperty)) { colorSpace = new ICCColorSpaceWithIntent (ICC_Profile.getInstance(ColorSpace.CS_sRGB), RenderingIntent.AUTO, "sRGB", null); } else if (!CSS_AUTO_VALUE.equalsIgnoreCase(colorProfileProperty) && !"".equalsIgnoreCase(colorProfileProperty)){ // The value is neither 'sRGB' nor 'auto': it is a profile name. SVGColorProfileElementBridge profileBridge = (SVGColorProfileElementBridge) ctx.getBridge (SVG_NAMESPACE_URI, SVG_COLOR_PROFILE_TAG); if (profileBridge != null) { colorSpace = profileBridge.createICCColorSpaceWithIntent (ctx, element, colorProfileProperty); } } return colorSpace; }
cs = new ICCColorSpaceWithIntent(p, intent, href, iccProfileName);
cs = new ICCColorSpaceWithIntent(p, intent, href, iccProfileName);
cs = new ICCColorSpaceWithIntent(p, intent, href, iccProfileName);