congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CSSUtilities.convertColorRendering
Code IndexAdd Tabnine to your IDE (free)

How to use
convertColorRendering
method
in
org.apache.batik.bridge.CSSUtilities

Best Java code snippets using org.apache.batik.bridge.CSSUtilities.convertColorRendering (Showing top 20 results out of 315)

origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Invoked for each CSS property that has changed.
 */
protected void handleCSSPropertyChanged(int property) {
  switch(property) {
  case SVGCSSEngine.IMAGE_RENDERING_INDEX:
  case SVGCSSEngine.COLOR_INTERPOLATION_INDEX:
    RenderingHints hints = CSSUtilities.convertImageRendering(e, null);
    hints = CSSUtilities.convertColorRendering(e, hints);
    if (hints != null) {
      node.setRenderingHints(hints);
    }
    break;
  default:
    super.handleCSSPropertyChanged(property);
  }
}
origin: org.apache.xmlgraphics/batik-bridge

/**
 * Invoked for each CSS property that has changed.
 */
protected void handleCSSPropertyChanged(int property) {
  switch(property) {
  case SVGCSSEngine.IMAGE_RENDERING_INDEX:
  case SVGCSSEngine.COLOR_INTERPOLATION_INDEX:
    RenderingHints hints = CSSUtilities.convertImageRendering(e, null);
    hints = CSSUtilities.convertColorRendering(e, hints);
    if (hints != null) {
      node.setRenderingHints(hints);
    }
    break;
  default:
    super.handleCSSPropertyChanged(property);
  }
}
origin: apache/batik

/**
 * Invoked for each CSS property that has changed.
 */
protected void handleCSSPropertyChanged(int property) {
  switch(property) {
  case SVGCSSEngine.IMAGE_RENDERING_INDEX:
  case SVGCSSEngine.COLOR_INTERPOLATION_INDEX:
    RenderingHints hints = CSSUtilities.convertImageRendering(e, null);
    hints = CSSUtilities.convertColorRendering(e, hints);
    if (hints != null) {
      node.setRenderingHints(hints);
    }
    break;
  default:
    super.handleCSSPropertyChanged(property);
  }
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Creates a <code>GraphicsNode</code> according to the specified parameters.
 *
 * @param ctx the bridge context to use
 * @param e the element that describes the graphics node to build
 * @return a graphics node that represents the specified element
 */
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
  CompositeGraphicsNode gn =
    (CompositeGraphicsNode)super.createGraphicsNode(ctx, e);
  if (gn == null)
    return null;
  associateSVGContext(ctx, e, gn);
  // 'color-rendering'
  RenderingHints hints = null;
  hints = CSSUtilities.convertColorRendering(e, hints);
  if (hints != null)
    gn.setRenderingHints(hints);
  // 'enable-background'
  Rectangle2D r = CSSUtilities.convertEnableBackground(e);
  if (r != null)
    gn.setBackgroundEnable(r);
  return gn;
}
origin: org.apache.xmlgraphics/batik-bridge

/**
 * Creates a <code>GraphicsNode</code> according to the specified parameters.
 *
 * @param ctx the bridge context to use
 * @param e the element that describes the graphics node to build
 * @return a graphics node that represents the specified element
 */
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
  CompositeGraphicsNode gn =
    (CompositeGraphicsNode)super.createGraphicsNode(ctx, e);
  if (gn == null)
    return null;
  associateSVGContext(ctx, e, gn);
  // 'color-rendering'
  RenderingHints hints = null;
  hints = CSSUtilities.convertColorRendering(e, hints);
  if (hints != null)
    gn.setRenderingHints(hints);
  // 'enable-background'
  Rectangle2D r = CSSUtilities.convertEnableBackground(e);
  if (r != null)
    gn.setBackgroundEnable(r);
  return gn;
}
origin: apache/batik

/**
 * Creates a graphics node using the specified BridgeContext and
 * for the specified element.
 *
 * @param ctx the bridge context to use
 * @param e the element that describes the graphics node to build
 * @return a graphics node that represents the specified element
 */
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
  ShapeNode shapeNode = (ShapeNode)super.createGraphicsNode(ctx, e);
  if (shapeNode == null) {
    return null;
  }
  associateSVGContext(ctx, e, shapeNode);
  // delegates to subclasses the shape construction
  buildShape(ctx, e, shapeNode);
  // 'shape-rendering' and 'color-rendering'
  RenderingHints hints = null;
  hints = CSSUtilities.convertColorRendering(e, hints);
  hints = CSSUtilities.convertShapeRendering(e, hints);
  if (hints != null)
    shapeNode.setRenderingHints(hints);
  return shapeNode;
}
origin: org.apache.xmlgraphics/batik-bridge

/**
 * Creates a graphics node using the specified BridgeContext and
 * for the specified element.
 *
 * @param ctx the bridge context to use
 * @param e the element that describes the graphics node to build
 * @return a graphics node that represents the specified element
 */
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
  ShapeNode shapeNode = (ShapeNode)super.createGraphicsNode(ctx, e);
  if (shapeNode == null) {
    return null;
  }
  associateSVGContext(ctx, e, shapeNode);
  // delegates to subclasses the shape construction
  buildShape(ctx, e, shapeNode);
  // 'shape-rendering' and 'color-rendering'
  RenderingHints hints = null;
  hints = CSSUtilities.convertColorRendering(e, hints);
  hints = CSSUtilities.convertShapeRendering(e, hints);
  if (hints != null)
    shapeNode.setRenderingHints(hints);
  return shapeNode;
}
origin: fr.avianey.apache-xmlgraphics/batik

/**
 * Creates a graphics node using the specified BridgeContext and
 * for the specified element.
 *
 * @param ctx the bridge context to use
 * @param e the element that describes the graphics node to build
 * @return a graphics node that represents the specified element
 */
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
  ShapeNode shapeNode = (ShapeNode)super.createGraphicsNode(ctx, e);
  if (shapeNode == null) {
    return null;
  }
  associateSVGContext(ctx, e, shapeNode);
  // delegates to subclasses the shape construction
  buildShape(ctx, e, shapeNode);
  // 'shape-rendering' and 'color-rendering'
  RenderingHints hints = null;
  hints = CSSUtilities.convertColorRendering(e, hints);
  hints = CSSUtilities.convertShapeRendering(e, hints);
  if (hints != null)
    shapeNode.setRenderingHints(hints);
  return shapeNode;
}
origin: apache/batik

/**
 * Creates a <code>GraphicsNode</code> according to the specified parameters.
 *
 * @param ctx the bridge context to use
 * @param e the element that describes the graphics node to build
 * @return a graphics node that represents the specified element
 */
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
  CompositeGraphicsNode gn =
    (CompositeGraphicsNode)super.createGraphicsNode(ctx, e);
  if (gn == null)
    return null;
  associateSVGContext(ctx, e, gn);
  // 'color-rendering'
  RenderingHints hints = null;
  hints = CSSUtilities.convertColorRendering(e, hints);
  if (hints != null)
    gn.setRenderingHints(hints);
  // 'enable-background'
  Rectangle2D r = CSSUtilities.convertEnableBackground(e);
  if (r != null)
    gn.setBackgroundEnable(r);
  return gn;
}
origin: org.apache.xmlgraphics/batik-bridge

hints = CSSUtilities.convertColorRendering(e, hints);
hints = CSSUtilities.convertTextRendering (e, hints);
if (hints != null)
origin: fr.avianey.apache-xmlgraphics/batik

hints = CSSUtilities.convertColorRendering(e, hints);
hints = CSSUtilities.convertTextRendering (e, hints);
if (hints != null)
origin: apache/batik

hints = CSSUtilities.convertColorRendering(e, hints);
hints = CSSUtilities.convertTextRendering (e, hints);
if (hints != null)
origin: org.apache.xmlgraphics/batik-bridge

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null) {
  node.setRenderingHints(hints);
origin: fr.avianey.apache-xmlgraphics/batik

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null) {
  node.setRenderingHints(hints);
origin: org.apache.xmlgraphics/batik-bridge

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null) {
  node.setRenderingHints(hints);
origin: fr.avianey.apache-xmlgraphics/batik

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null) {
  node.setRenderingHints(hints);
origin: fr.avianey.apache-xmlgraphics/batik

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null)
  imageNode.setRenderingHints(hints);
origin: org.apache.xmlgraphics/batik-bridge

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null)
  imageNode.setRenderingHints(hints);
origin: apache/batik

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null)
  imageNode.setRenderingHints(hints);
origin: apache/batik

hints = CSSUtilities.convertColorRendering(e, hints);
if (hints != null) {
  node.setRenderingHints(hints);
org.apache.batik.bridgeCSSUtilitiesconvertColorRendering

Javadoc

Fills the rendering hints for the specified element or do nothing if none has been specified. If the given RenderingHints is null, a new one is created. Checks the 'color-rendering' property.

Here is how the mapping between SVG rendering hints and the Java2D rendering hints is done:

'optimizeSpeed':
  • KEY_COLOR_RENDERING=VALUE_COLOR_RENDER_SPEED
  • KEY_ALPHA_INTERPOLATION=VALUE_ALPHA_INTERPOLATION_SPEED
'optimizeQuality':
  • KEY_COLOR_RENDERING=VALUE_COLOR_RENDER_QUALITY
  • KEY_ALPHA_INTERPOLATION=VALUE_ALPHA_INTERPOLATION_QUALITY

Popular methods of CSSUtilities

  • convertDisplay
    Returns true if the specified element has to be displayed, false otherwise. Checks the 'display' pro
  • computeStyleAndURIs
    Partially computes the style in the 'def' tree and set it in the 'use' tree. Note: This method must
  • convertClip
    Returns an array of floating offsets representing the 'clip' property or null if 'auto'. The offsets
  • convertClipPath
    Returns a Clip referenced by the specified element and which applies on the specified graphics node.
  • convertClipRule
    Returns the 'clip-rule' for the specified element.
  • convertColorInterpolation
    Returns the color space for the specified element. Checks the 'color-interpolation' property
  • convertColorInterpolationFilters
    Returns the color space for the specified filter element. Checks the 'color-interpolation-filters' p
  • convertCursor
    Returns the Cursor corresponding to the input element's cursor property
  • convertEnableBackground
    Returns the subregion of user space where access to the background image is allowed to happen.
  • convertFillRule
    Returns the 'fill-rule' for the specified element.
  • convertFilter
    Returns a Filter referenced by the specified element and which applies on the specified graphics nod
  • convertFloodColor
    Converts the color defined on the specified element to a Color.
  • convertFilter,
  • convertFloodColor,
  • convertImageRendering,
  • convertLightingColor,
  • convertMask,
  • convertOpacity,
  • convertOverflow,
  • convertPointerEvents,
  • convertShapeRendering

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now