congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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