Examples of SVGIcon


Examples of com.cburch.draw.tools.SVGIcon

        iconNames[1] = rect;
        iconNames[2] = din;
    }

    private SVGIcon getIcon(int type) {
        SVGIcon ret = icons[type];
        if (ret != null) {
            return ret;
        } else {
            String iconName = iconNames[type];
            if (iconName == null) {
View Full Code Here

Examples of com.cburch.draw.tools.SVGIcon

    private static final String path = "logisim/icons";

    private Icons() { }

    public static SVGIcon getIcon(String name) {
        return new SVGIcon(name);
    }
View Full Code Here

Examples of com.kitfox.svg.app.beans.SVGIcon

        if (matchName.matches()) {
            shortName = matchName.group(1);
        }
        shortName += "." + format;

        SVGIcon icon = new SVGIcon();
        icon.setSvgURI(source.toURI());
        icon.setAntiAlias(antiAlias);

        maybeResizeIcon(icon);

        int width = icon.getIconWidth();
        int height = icon.getIconHeight();
        icon.setClipToViewbox(clipToViewBox);
        BufferedImage image = new BufferedImage(width, height,
                BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = image.createGraphics();
        g = new ImageResizingGraphics(g);

        if (bgColor != null) {
            g.setColor(bgColor);
            g.fillRect(0, 0, width, height);
        }

        g.setClip(0, 0, width, height);
        icon.paintIcon(null, g, 0, 0);
        g.dispose();

        File outFile = destDir == null ? new File(baseDir, shortName)
                : new File(destDir, shortName);
        if (verbose)
View Full Code Here

Examples of com.kitfox.svg.app.beans.SVGIcon

        try
        {
            String fileName = imageURL.getFile();
            if (".svg".equals(fileName.substring(fileName.length() - 4).toLowerCase()))
            {
                SVGIcon icon = new SVGIcon();
                icon.setSvgURI(imageURL.toURI());
               
                BufferedImage img = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
                Graphics2D g = img.createGraphics();
                icon.paintIcon(null, g, 0, 0);
                g.dispose();
                ref = new SoftReference(img);
            }
            else
            {
View Full Code Here

Examples of com.kitfox.svg.app.beans.SVGIcon

        try
        {
            String fileName = imageURL.getFile();
            if (".svg".equals(fileName.substring(fileName.length() - 4).toLowerCase()))
            {
                SVGIcon icon = new SVGIcon();
                icon.setSvgURI(imageURL.toURI());

                BufferedImage img = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
                Graphics2D g = img.createGraphics();
                icon.paintIcon(null, g, 0, 0);
                g.dispose();
                ref = new SoftReference(img);
            } else
            {
                BufferedImage img = ImageIO.read(imageURL);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.