org.eclipse.birt.chart.device.svg_3.7.2.v20120213

(outerArc);
        fArea.exclusiveOr(new Area(innerArc));
        
        elm = svggc.createGeneralPath(fArea);
      }
      else
      {
        elm = svggc.createGeneralPath(new Arc2D.Double(are.getTopLeft()
          .getX(), 
          are.getTopLeft().getY(), 
          are.getWidth(), 
          are.getHeight(), 
          are.getStartAngle(), 
          are.getAngleExtent(), 
          toG2dArcType(are.getStyle())));
      }
    }
    ivRenderer.prepareInteractiveEvent(elm, ie, triggers);
  }
  
  public void drawArc(ArcRenderEvent are)
    throws ChartException
  {
    ivRenderer.groupPrimitive(are, false);
    super.drawArc(are);
    ivRenderer.ungroupPrimitive(are, false);
  }
  
  public void drawArea(AreaRenderEvent are)
    throws ChartException
  {
    ivRenderer.groupPrimitive(are, false);
    super.drawArea(are);
    ivRenderer.ungroupPrimitive(are, false);
  }
  
  public void drawImage(ImageRenderEvent pre)
    throws ChartException
  {
    ivRenderer.groupPrimitive(pre, false);
    super.drawImage(pre);
    ivRenderer.ungroupPrimitive(pre, false);
  }
  
  protected Image createImage(byte[] data)
  {
    return new SVGImage(super.createImage(data), null, data);
  }
  
  public void drawLine(LineRenderEvent lre)
    throws ChartException
  {
    ivRenderer.groupPrimitive(lre, false);
    super.drawLine(lre);
    ivRenderer.ungroupPrimitive(lre, false);
  }
  
  public void drawOval(OvalRenderEvent ore)
    throws ChartException
  {
    ivRenderer.groupPrimitive(ore, false);
    super.drawOval(ore);
    ivRenderer.ungroupPrimitive(ore, false);
  }
  
  public void drawPolygon(PolygonRenderEvent pre)
    throws ChartException
  {
    ivRenderer.groupPrimitive(pre, false);
    super.drawPolygon(pre);
    ivRenderer.ungroupPrimitive(pre, false);
  }
  
  public void drawRectangle(RectangleRenderEvent rre)
    throws ChartException
  {
    ivRenderer.groupPrimitive(rre, false);
    super.drawRectangle(rre);
    ivRenderer.ungroupPrimitive(rre, false);
  }
  
  public void fillArc(ArcRenderEvent are)
    throws ChartException
  {
    ivRenderer.groupPrimitive(are, false);
    super.fillArc(are);
    ivRenderer.ungroupPrimitive(are, false);
  }
  
  public void fillArea(AreaRenderEvent are)
    throws ChartException
  {
    ivRenderer.groupPrimitive(are, false);
    super.fillArea(are);
    ivRenderer.ungroupPrimitive(are, false);
  }
  
  public void fillOval(OvalRenderEvent ore)
    throws ChartException
  {
    ivRenderer.groupPrimitive(ore, false);
    super.fillOval(ore);
    ivRenderer.ungroupPrimitive(ore, false);
  }
  
  public void fillPolygon(PolygonRenderEvent pre)
    throws ChartException
  {
    ivRenderer.groupPrimitive(pre, false);
    super.fillPolygon(pre);
    ivRenderer.ungroupPrimitive(pre, false);
  }
  
  public void fillRectangle(RectangleRenderEvent rre)
    throws ChartException
  {
    ivRenderer.groupPrimitive(rre, false);
    super.fillRectangle(rre);
    ivRenderer.ungroupPrimitive(rre, false);
  }
  
  public void drawText(TextRenderEvent tre)
    throws ChartException
  {
    String fontName = convertFont(tre.getLabel()
      .getCaption()
      .getFont()
      .getName());
    if (fontName != null) {
      tre.getLabel().getCaption().getFont().setName(fontName);
    }
    ivRenderer.groupPrimitive(tre, true);
    switch (tre.getAction())
    {
    case 0: 
      throw new ChartException("org.eclipse.birt.chart.device.extension", 
        11, 
        "exception.missing.text.render.action", 
        Messages.getResourceBundle(getULocale()));
    case 1: 
      _tr.renderShadowAtLocation(this, 
        tre.getTextPosition(), 
        tre.getLocation(), 
        tre.getLabel());
      break;
    case 2: 
      _tr.renderTextAtLocation(this, 
        tre.getTextPosition(), 
        tre.getLocation(), 
        tre.getLabel());
      break;
    case 3: 
      _tr.renderTextInBlock(this, 
        tre.getBlockBounds(), 
        tre.getBlockAlignment(), 
        tre.getLabel());
    }
    ivRenderer.ungroupPrimitive(tre, true);
  }
  
  public String getMimeType()
  {
    return "image/svg+xml";
  }
  
  protected String convertFont(String fontFamily)
  {
    return FontUtil.getFontFamily(fontFamily);
  }
  
  protected Image createImageFromModel(Fill imageModel)
    throws ChartException
  {
    Image img = super.createImageFromModel(imageModel);
    if (!(img instanceof SVGImage)) {
      img = new SVGImage(img, null);
    }
    return img;
  }
  
  protected BufferedImage convertPatternImage(Image img)
  {
    if ((img instanceof SVGImage)) {
      img = image;
    }
    return super.convertPatternImage(img);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.device.svg.SVGRendererImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.device.svg;

import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.font.FontRenderContext;
import java.text.AttributedCharacterIterator.Attribute;
import java.util.Map;
import org.eclipse.birt.chart.device.util.ChartTextLayout;

public class SVGTextLayout
  extends ChartTextLayout
{
  public SVGTextLayout(String value, Map<? extends AttributedCharacterIterator.Attribute, ?> fontAttributes, FontRenderContext frc)
  {
    super(value, fontAttributes, frc);
  }
  
  public void draw(Graphics2D g2d, float x, float y)
  {
    if (frc.isAntiAliased()) {
      g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, 
        RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    } else {
      g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, 
        RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
    }
    g2d.drawString(value, x, y);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.device.svg.SVGTextLayout
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.device.svg;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.geom.Rectangle2D.Double;
import org.eclipse.birt.chart.device.IDeviceRenderer;
import org.eclipse.birt.chart.device.IDisplayServer;
import org.eclipse.birt.chart.device.IPrimitiveRenderer;
import org.eclipse.birt.chart.device.util.ChartTextRenderer;
import org.eclipse.birt.chart.model.attribute.ColorDefinition;
import org.eclipse.birt.chart.model.attribute.LineAttributes;

public class SVGTextRenderer
  extends ChartTextRenderer
{
  public SVGTextRenderer(IDisplayServer dispServer)
  {
    super(dispServer);
  }
  
  protected void fillShadow(Graphics2D g2d, Shape shape)
  {
    ((SVGGraphics2D)g2d).fill(shape, false);
  }
  
  protected void renderOutline(IPrimitiveRenderer renderer, LineAttributes lineAttribs, Rectangle2D.Double rect)
  {
    if ((lineAttribs != null) && 
      (lineAttribs.isVisible()) && 
      (lineAttribs.getColor() != null))
    {
      SVGGraphics2D g2d = (SVGGraphics2D)((IDeviceRenderer)renderer).getGraphicsContext();
      Stroke sPrevious = null;
      ColorDefinition cd = lineAttribs.getColor();
      Stroke sCurrent = ((SVGRendererImpl)renderer).getCachedStroke(lineAttribs);
      if (sCurrent != null)
      {
        sPrevious = g2d.getStroke();
        g2d.setStroke(sCurrent);
      }
      g2d.setColor((Color)_sxs.getColor(cd));
      g2d.draw(rect);
      g2d.setNoFillColor(g2d.getCurrentElement());
      if (sPrevious != null) {
        g2d.setStroke(sPrevious);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.device.svg.SVGTextRenderer
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.device.svg.i18n;

import com.ibm.icu.util.ULocale;
import com.ibm.icu.util.UResourceBundle;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.birt.chart.util.SecurityUtil;

public class Messages
{
  private static final String BUNDLE_NAME = "org.eclipse.birt.chart.device.svg.i18n.nls";
  private static final ResourceBundle RESOURCE_BUNDLE = UResourceBundle.getBundleInstance("org.eclipse.birt.chart.device.svg.i18n.nls", 
    ULocale.getDefault(), 
    SecurityUtil.getClassLoader(Messages.class));
  
  public static ResourceBundle getResourceBundle()
  {
    return RESOURCE_BUNDLE;
  }
  
  public static String getString(String key)
  {
    try
    {
      return RESOURCE_BUNDLE.getString(key);
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
  
  public static String getString(String key, Object[] oas)
  {
    try
    {
      return SecurityUtil.formatMessage(RESOURCE_BUNDLE.getString(key), 
        oas);
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
  
  public static String getString(String key, Object oa)
  {
    try
    {
      return SecurityUtil.formatMessage(RESOURCE_BUNDLE.getString(key), 
        new Object[] {
        oa });
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.device.svg.i18n.Messages
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.birt.chart.device.svg.plugin;

import org.eclipse.core.runtime.Plugin;

public class ChartDeviceSVGPlugin
  extends Plugin
{
  public static final String ID = "org.eclipse.birt.chart.device.svg";
}

/* Location:
 * Qualified Name:     org.eclipse.birt.chart.device.svg.plugin.ChartDeviceSVGPlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd