package org.pushingpixels.lafwidget.scroll.svg; import java.awt.*; import java.awt.geom.*; import javax.swing.Icon; import javax.swing.plaf.UIResource; import org.pushingpixels.lafwidget.icon.IsHiDpiAware; import org.pushingpixels.lafwidget.icon.IsResizable; /** * This class has been automatically generated using <a * href="https://flamingo.dev.java.net">Flamingo SVG transcoder</a>. */ public class autoscroll_all implements Icon, UIResource, IsResizable, IsHiDpiAware { /** * Paints the transcoded SVG image on the specified graphics context. You * can install a custom transformation on the graphics context to scale the * image. * * @param g * Graphics context. */ public static void paint(Graphics2D g) { Shape shape = null; Paint paint = null; Stroke stroke = null; float origAlpha = 1.0f; Composite origComposite = ((Graphics2D)g).getComposite(); if (origComposite instanceof AlphaComposite) { AlphaComposite origAlphaComposite = (AlphaComposite)origComposite; if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER) { origAlpha = origAlphaComposite.getAlpha(); } } AffineTransform defaultTransform_ = g.getTransform(); // g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0 = g.getTransform(); g.transform(new AffineTransform(0.0020000000949949026f, 0.0f, 0.0f, 0.0020000000949949026f, 0.018000000854954123f, 0.004000000189989805f)); // _0 g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0 = g.getTransform(); g.transform(new AffineTransform(-0.6782799959182739f, 0.7348039746284485f, -0.7348030209541321f, -0.6782799959182739f, 1215.0908203125f, 9.868412971496582f)); // _0_0 paint = new Color(74, 74, 74, 255); shape = new Ellipse2D.Double(755.333984375, 474.52398681640625, 160.70399475097656, 159.44400024414062); g.setPaint(paint); g.fill(shape); paint = new Color(0, 0, 0, 255); stroke = new BasicStroke(1.0f,0,0,4.0f,null,0.0f); shape = new Ellipse2D.Double(755.333984375, 474.52398681640625, 160.70399475097656, 159.44400024414062); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_0); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_1 = g.getTransform(); g.transform(new AffineTransform(0.9999989867210388f, 0.0011970000341534615f, -0.0011970000341534615f, 0.9999989867210388f, -733.0624389648438f, -50.88409423828125f)); // _0_1 paint = new Color(74, 74, 74, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(974.188, 51.146); ((GeneralPath)shape).lineTo(1081.254, 156.12); ((GeneralPath)shape).lineTo(867.121, 156.12); ((GeneralPath)shape).lineTo(974.188, 51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); paint = new Color(0, 0, 0, 255); stroke = new BasicStroke(1.0f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(974.188, 51.146); ((GeneralPath)shape).lineTo(1081.254, 156.12); ((GeneralPath)shape).lineTo(867.121, 156.12); ((GeneralPath)shape).lineTo(974.188, 51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_1); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_2 = g.getTransform(); g.transform(new AffineTransform(0.9999989867210388f, -0.0011970000341534615f, -0.0011970000341534615f, -0.9999989867210388f, 1001.0562133789062f, 439.6627502441406f)); // _0_2 paint = new Color(74, 74, 74, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(-760.055, -51.146); ((GeneralPath)shape).lineTo(-652.989, 53.828); ((GeneralPath)shape).lineTo(-867.122, 53.828); ((GeneralPath)shape).lineTo(-760.055, -51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); paint = new Color(0, 0, 0, 255); stroke = new BasicStroke(1.0f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(-760.055, -51.146); ((GeneralPath)shape).lineTo(-652.989, 53.828); ((GeneralPath)shape).lineTo(-867.122, 53.828); ((GeneralPath)shape).lineTo(-760.055, -51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_2); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_3 = g.getTransform(); g.transform(new AffineTransform(0.0011970000341534615f, 0.9999989867210388f, 0.9999989867210388f, -0.0011970000341534615f, 47.25912094116211f, 1008.0562133789062f)); // _0_3 paint = new Color(74, 74, 74, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(-760.055, -51.146); ((GeneralPath)shape).lineTo(-652.989, 53.828); ((GeneralPath)shape).lineTo(-867.122, 53.828); ((GeneralPath)shape).lineTo(-760.055, -51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); paint = new Color(0, 0, 0, 255); stroke = new BasicStroke(1.0f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(-760.055, -51.146); ((GeneralPath)shape).lineTo(-652.989, 53.828); ((GeneralPath)shape).lineTo(-867.122, 53.828); ((GeneralPath)shape).lineTo(-760.055, -51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_3); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_4 = g.getTransform(); g.transform(new AffineTransform(-0.0011970000341534615f, 0.9999989867210388f, -0.9999989867210388f, -0.0011970000341534615f, 435.8759460449219f, 1008.0547485351562f)); // _0_4 paint = new Color(74, 74, 74, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(-760.055, -51.146); ((GeneralPath)shape).lineTo(-652.989, 53.828); ((GeneralPath)shape).lineTo(-867.122, 53.828); ((GeneralPath)shape).lineTo(-760.055, -51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); paint = new Color(0, 0, 0, 255); stroke = new BasicStroke(1.0f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(-760.055, -51.146); ((GeneralPath)shape).lineTo(-652.989, 53.828); ((GeneralPath)shape).lineTo(-867.122, 53.828); ((GeneralPath)shape).lineTo(-760.055, -51.146); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_4); g.setTransform(defaultTransform__0); g.setTransform(defaultTransform_); } /** * Returns the X of the bounding box of the original SVG image. * * @return The X of the bounding box of the original SVG image. */ public static int getOrigX() { return 1; } /** * Returns the Y of the bounding box of the original SVG image. * * @return The Y of the bounding box of the original SVG image. */ public static int getOrigY() { return 1; } /** * Returns the width of the bounding box of the original SVG image. * * @return The width of the bounding box of the original SVG image. */ public static int getOrigWidth() { return 1; } /** * Returns the height of the bounding box of the original SVG image. * * @return The height of the bounding box of the original SVG image. */ public static int getOrigHeight() { return 1; } /** * The current width of this resizable icon. */ private int width; /** * The current height of this resizable icon. */ private int height; /** * Creates a new transcoded SVG image. */ public autoscroll_all() { this.width = getOrigWidth(); this.height = getOrigHeight(); } /* * (non-Javadoc) * * @see javax.swing.Icon#getIconHeight() */ @Override public int getIconHeight() { return height; } /* * (non-Javadoc) * * @see javax.swing.Icon#getIconWidth() */ @Override public int getIconWidth() { return width; } @Override public void setDimension(Dimension newDimension) { this.width = newDimension.width; this.height = newDimension.height; } @Override public boolean isHiDpiAware() { return true; } /* * (non-Javadoc) * * @see javax.swing.Icon#paintIcon(java.awt.Component, java.awt.Graphics, * int, int) */ @Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2d = (Graphics2D) g.create(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.translate(x, y); double coef1 = (double) this.width / (double) getOrigWidth(); double coef2 = (double) this.height / (double) getOrigHeight(); double coef = Math.min(coef1, coef2); g2d.clipRect(0, 0, this.width, this.height); g2d.scale(coef, coef); paint(g2d); g2d.dispose(); } public static autoscroll_all of(int width, int height) { autoscroll_all result = new autoscroll_all(); result.width = width; result.height = height; return result; } }