Class SVGColorProfileElementBridge

java.lang.Object
org.apache.batik.bridge.AbstractSVGBridge
org.apache.batik.bridge.SVGColorProfileElementBridge
All Implemented Interfaces:
Bridge, ErrorConstants, XMLConstants, CSSConstants, SVGConstants

public class SVGColorProfileElementBridge extends AbstractSVGBridge implements ErrorConstants
This class bridges an SVG color-profile element with an ICC_ColorSpace object.
Version:
$Id: SVGColorProfileElementBridge.java 1831635 2018-05-15 13:33:47Z ssteiner $
  • Field Details

  • Constructor Details

    • SVGColorProfileElementBridge

      public SVGColorProfileElementBridge()
  • Method Details

    • getLocalName

      public String getLocalName()
      Returns 'colorProfile'.
      Specified by:
      getLocalName in interface Bridge
    • createICCColorSpaceWithIntent

      public org.apache.xmlgraphics.java2d.color.ICCColorSpaceWithIntent createICCColorSpaceWithIntent(BridgeContext ctx, Element paintedElement, String iccProfileName)
      Creates an ICC_ColorSpace according to the specified parameters.

      If a color profile cannot be located an error message will be sent to the user agent and the method returns null. In this case, Batik will later fall back to sRGB.

      Parameters:
      ctx - the bridge context to use
      paintedElement - element on which the color is painted
      iccProfileName - name of the profile that should be loaded that could be a color-profile element or an @color-profile CSS rule
      Returns:
      the ICC color profile (or null if the color profile could not be located)
    • convertIntent

      private static org.apache.xmlgraphics.java2d.color.RenderingIntent convertIntent(Element profile, BridgeContext ctx)