package test.svg.transcoded; import java.awt.*; import java.awt.geom.*; /** * This class has been automatically generated using <a * href="https://github.com/kirill-grouchnikov/flamingo">Flamingo SVG transcoder</a>. */ public class Preferences_desktop_accessibility implements org.pushingpixels.flamingo.api.common.icon.ResizableIcon { /** * 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(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0 g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0 g.setComposite(AlphaComposite.getInstance(3, 0.4064171f * origAlpha)); AffineTransform defaultTransform__0_0_0 = g.getTransform(); g.transform(new AffineTransform(2.4600489139556885f, 0.0f, 0.0f, 2.4600489139556885f, -49.40945816040039f, -67.96373748779297f)); // _0_0_0 paint = new RadialGradientPaint(new Point2D.Double(30.203561782836914, 44.56548309326172), 6.5659914f, new Point2D.Double(30.203561782836914, 44.56548309326172), new float[] {0.0f,1.0f}, new Color[] {new Color(0, 0, 0, 255),new Color(0, 0, 0, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 0.3384619951248169f, -1.4354759471951642E-15f, 29.481779098510742f)); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(36.769554, 44.565483); ((GeneralPath)shape).curveTo(36.769554, 45.792847, 33.82986, 46.78782, 30.203562, 46.78782); ((GeneralPath)shape).curveTo(26.577265, 46.78782, 23.63757, 45.792847, 23.63757, 44.565483); ((GeneralPath)shape).curveTo(23.63757, 43.33812, 26.577265, 42.343147, 30.203562, 42.343147); ((GeneralPath)shape).curveTo(33.82986, 42.343147, 36.769554, 43.33812, 36.769554, 44.565483); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_0_0); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_1 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0_1 paint = new RadialGradientPaint(new Point2D.Double(25.457862854003906, 35.59623336791992), 20.530962f, new Point2D.Double(25.457862854003906, 35.59623336791992), new float[] {0.0f,1.0f}, new Color[] {new Color(156, 188, 222, 255),new Color(32, 74, 135, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(2.1281850337982178f, -1.7271729602086339E-9f, 2.422814131750186E-16f, 2.128253936767578f, -29.019060134887695f, -39.917789459228516f)); shape = new RoundRectangle2D.Double(4.414728164672852, 3.5233452320098877, 40.06192398071289, 40.06192398071289, 10.909647941589355, 10.909647941589355); g.setPaint(paint); g.fill(shape); paint = new Color(52, 101, 164, 255); stroke = new BasicStroke(1.0f,0,2,10.0f,null,0.0f); shape = new RoundRectangle2D.Double(4.414728164672852, 3.5233452320098877, 40.06192398071289, 40.06192398071289, 10.909647941589355, 10.909647941589355); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_0_1); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_2 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0_2 paint = new Color(255, 255, 255, 255); stroke = new BasicStroke(2.0000021f,0,2,10.0f,null,0.0f); shape = new RoundRectangle2D.Double(5.8954033851623535, 5.004019737243652, 37.10063552856445, 37.10063552856445, 7.81350040435791, 7.81350040435791); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_0_2); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_3 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 1.5521910190582275f, -0.6401000022888184f)); // _0_0_3 g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_3_0 = g.getTransform(); g.transform(new AffineTransform(0.7692310214042664f, 0.0f, 0.0f, 0.7692310214042664f, 6.846158027648926f, 4.576913833618164f)); // _0_0_3_0 g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_3_0_0 = g.getTransform(); g.transform(new AffineTransform(1.444443941116333f, 0.0f, 0.0f, 1.444443941116333f, -7.841267108917236f, -5.8095221519470215f)); // _0_0_3_0_0 paint = new Color(255, 255, 255, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(20.857141, 13.071428); ((GeneralPath)shape).curveTo(20.857584, 14.220077, 20.24504, 15.281661, 19.250357, 15.8561125); ((GeneralPath)shape).curveTo(18.25567, 16.430565, 17.03004, 16.430565, 16.035357, 15.8561125); ((GeneralPath)shape).curveTo(15.040671, 15.281661, 14.428128, 14.220077, 14.428571, 13.071428); ((GeneralPath)shape).curveTo(14.428128, 11.92278, 15.040671, 10.861196, 16.035357, 10.286744); ((GeneralPath)shape).curveTo(17.03004, 9.712292, 18.25567, 9.712292, 19.250357, 10.286744); ((GeneralPath)shape).curveTo(20.24504, 10.861196, 20.857584, 11.92278, 20.857141, 13.071428); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_0_3_0_0); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_3_0_1 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0_3_0_1 paint = new Color(255, 255, 255, 255); stroke = new BasicStroke(2.5f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(17.571428, 13.142857); ((GeneralPath)shape).lineTo(20.0, 30.0); ((GeneralPath)shape).lineTo(32.0, 27.428572); ((GeneralPath)shape).lineTo(34.42857, 37.0); ((GeneralPath)shape).lineTo(38.0, 36.0); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_0_3_0_1); g.setTransform(defaultTransform__0_0_3_0); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_3_1 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0_3_1 paint = new Color(255, 255, 255, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(17.374998, 21.668259); ((GeneralPath)shape).curveTo(14.821727, 23.078575, 13.0, 25.694616, 13.0, 28.80768); ((GeneralPath)shape).curveTo(13.0, 33.36178, 16.715132, 37.076912, 21.26923, 37.076912); ((GeneralPath)shape).curveTo(25.584839, 37.076912, 29.03297, 33.705624, 29.39423, 29.480759); ((GeneralPath)shape).lineTo(27.399036, 29.937489); ((GeneralPath)shape).curveTo(26.85153, 32.888084, 24.382202, 35.153835, 21.26923, 35.153835); ((GeneralPath)shape).curveTo(17.755636, 35.153835, 14.923077, 32.321274, 14.923077, 28.80768); ((GeneralPath)shape).curveTo(14.923077, 26.611685, 16.12003, 24.778076, 17.807692, 23.639412); ((GeneralPath)shape).lineTo(17.374998, 21.668259); ((GeneralPath)shape).closePath(); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_0_3_1); g.setTransform(defaultTransform__0_0_3); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_4 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0_4 paint = new Color(255, 255, 255, 255); stroke = new BasicStroke(1.9230775f,0,0,4.0f,null,0.0f); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(22.857143, 20.857143); ((GeneralPath)shape).lineTo(31.714287, 20.0); g.setPaint(paint); g.setStroke(stroke); g.draw(shape); g.setTransform(defaultTransform__0_0_4); g.setTransform(defaultTransform__0_0); 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 double getOrigX() { return 3.9147281646728516; } /** * 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 double getOrigY() { return 3.0233452320098877; } /** * 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 double getOrigWidth() { return 41.061927795410156; } /** * 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 double getOrigHeight() { return 44.11323928833008; } /** * The current width of this resizable icon. */ int width; /** * The current height of this resizable icon. */ int height; /** * Creates a new transcoded SVG image. */ public Preferences_desktop_accessibility() { this.width = (int) getOrigWidth(); this.height = (int) 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; } /* * (non-Javadoc) * * @see * org.jvnet.flamingo.common.icon.ResizableIcon#setDimension(java.awt.Dimension * ) */ @Override public void setDimension(Dimension newDimension) { this.width = newDimension.width; this.height = newDimension.height; } /* * (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); g2d.translate(-getOrigX(), -getOrigY()); if (coef1 != coef2) { if (coef1 < coef2) { int extraDy = (int) ((getOrigWidth() - getOrigHeight()) / 2.0); g2d.translate(0, extraDy); } else { int extraDx = (int) ((getOrigHeight() - getOrigWidth()) / 2.0); g2d.translate(extraDx, 0); } } paint(g2d); g2d.dispose(); } }