Package org.apache.batik.bridge.AbstractSVGGradientElementBridge

Examples of org.apache.batik.bridge.AbstractSVGGradientElementBridge.Stop


        float [] offsets = new float[stopLength];
        java.awt.Color [] colors  = new java.awt.Color[stopLength];
        Iterator<Stop> iter = stops.iterator();
        for (int i=0; iter.hasNext(); ++i) {
          Stop stop = (Stop)iter.next();
          offsets[i] = stop.offset;
          colors[i] = stop.color;
        }
       
        //Get the spread method of the gradient
View Full Code Here


     * @param opacity the opacity
     * @param ctx the bridge context
     */
    protected static List<Stop> extractLocalStop(Element gradientElement, float opacity, BridgeContext ctx) {
      LinkedList<Stop> stops = null;
      Stop previous = null;
      for (Node n = gradientElement.getFirstChild(); n != null; n = n.getNextSibling()){
        if ((n.getNodeType() != Node.ELEMENT_NODE)) {
          continue;
        }

        Element e = (Element)n;
        Bridge bridge = ctx.getBridge(e);
        if (bridge == null || !(bridge instanceof SVGStopElementBridge)) {
          continue;
        }
        Stop stop = ((SVGStopElementBridge)bridge).createStop(ctx, gradientElement, e, opacity);
        if (stops == null) {
          stops = new LinkedList<Stop>();
        }
        if (previous != null) {
          if (stop.offset < previous.offset) {
View Full Code Here

TOP

Related Classes of org.apache.batik.bridge.AbstractSVGGradientElementBridge.Stop

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.