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_font 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(24.445690155029297, 35.878170013427734), 20.530962f, new Point2D.Double(24.445690155029297, 35.878170013427734), new float[] {0.0f,1.0f}, new Color[] {new Color(255, 255, 255, 255),new Color(220, 220, 220, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.9950579404830933f, -1.6515269512350966E-32f, 0.0f, 1.9950579404830933f, -24.324880599975586f, -35.700870513916016f)); 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(155, 155, 155, 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(0.99999976f,0,2,10.0f,null,0.0f); shape = new RoundRectangle2D.Double(5.597388744354248, 4.70600700378418, 37.69658660888672, 37.69658660888672, 8.485278129577637, 8.485278129577637); 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, 0.0f, 0.0f)); // _0_0_3 paint = new Color(0, 0, 0, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(19.187523, 7.5673065); ((GeneralPath)shape).lineTo(16.902367, 15.512619); ((GeneralPath)shape).lineTo(16.644554, 16.579025); ((GeneralPath)shape).curveTo(16.621107, 16.68059, 16.60939, 16.766527, 16.609398, 16.836838); ((GeneralPath)shape).curveTo(16.60939, 16.96184, 16.648453, 17.071215, 16.726585, 17.164963); ((GeneralPath)shape).curveTo(16.789078, 17.235275, 16.867203, 17.270432, 16.96096, 17.270432); ((GeneralPath)shape).curveTo(17.062513, 17.270432, 17.195328, 17.207932, 17.359398, 17.082932); ((GeneralPath)shape).curveTo(17.664076, 16.85637, 18.070326, 16.38762, 18.578148, 15.676682); ((GeneralPath)shape).lineTo(18.976585, 15.957932); ((GeneralPath)shape).curveTo(18.437513, 16.770433, 17.882826, 17.391525, 17.312523, 17.821213); ((GeneralPath)shape).curveTo(16.742203, 18.243088, 16.214859, 18.454025, 15.730492, 18.454025); ((GeneralPath)shape).curveTo(15.394547, 18.454025, 15.140641, 18.368088, 14.968773, 18.196213); ((GeneralPath)shape).curveTo(14.804704, 18.03215, 14.722673, 17.789963, 14.72268, 17.46965); ((GeneralPath)shape).curveTo(14.722673, 17.08684, 14.80861, 16.582933, 14.980492, 15.957932); ((GeneralPath)shape).lineTo(15.226586, 15.079025); ((GeneralPath)shape).curveTo(14.203142, 16.414965, 13.261737, 17.348557, 12.402367, 17.879807); ((GeneralPath)shape).curveTo(11.785176, 18.262619, 11.179708, 18.454025, 10.585961, 18.454025); ((GeneralPath)shape).curveTo(10.015646, 18.454025, 9.523459, 18.21965, 9.109399, 17.7509); ((GeneralPath)shape).curveTo(8.695335, 17.27434, 8.488304, 16.621996, 8.488305, 15.793869); ((GeneralPath)shape).curveTo(8.488304, 14.551685, 8.859398, 13.243093, 9.601586, 11.868088); ((GeneralPath)shape).curveTo(10.351583, 10.485283, 11.300801, 9.379815, 12.449242, 8.5516815); ((GeneralPath)shape).curveTo(13.347674, 7.895442, 14.19533, 7.567317, 14.992211, 7.5673065); ((GeneralPath)shape).curveTo(15.468766, 7.567317, 15.863297, 7.692317, 16.175804, 7.9423065); ((GeneralPath)shape).curveTo(16.496109, 8.192317, 16.738297, 8.606379, 16.902367, 9.184494); ((GeneralPath)shape).lineTo(17.324242, 7.8485565); ((GeneralPath)shape).lineTo(19.187523, 7.5673065); ((GeneralPath)shape).moveTo(15.015648, 8.1766815); ((GeneralPath)shape).curveTo(14.515642, 8.176692, 13.984392, 8.411066, 13.421898, 8.8798065); ((GeneralPath)shape).curveTo(12.625019, 9.543878, 11.914082, 10.528252, 11.289086, 11.832932); ((GeneralPath)shape).curveTo(10.671896, 13.137624, 10.363302, 14.31731, 10.363305, 15.371994); ((GeneralPath)shape).curveTo(10.363302, 15.903246, 10.496115, 16.32512, 10.761742, 16.637619); ((GeneralPath)shape).curveTo(11.027364, 16.942308, 11.332051, 17.09465, 11.675805, 17.09465); ((GeneralPath)shape).curveTo(12.527363, 17.09465, 13.453143, 16.465746, 14.453148, 15.207932); ((GeneralPath)shape).curveTo(15.789078, 13.536061, 16.457047, 11.821219, 16.457054, 10.0634); ((GeneralPath)shape).curveTo(16.457047, 9.399346, 16.32814, 8.918879, 16.070335, 8.621994); ((GeneralPath)shape).curveTo(15.812515, 8.325129, 15.460953, 8.176692, 15.015648, 8.1766815); g.setPaint(paint); g.fill(shape); 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(0, 0, 0, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(23.843164, 20.148026); ((GeneralPath)shape).lineTo(23.843164, 26.056417); ((GeneralPath)shape).curveTo(24.570492, 25.30076, 25.31199, 24.724564, 26.067669, 24.327824); ((GeneralPath)shape).curveTo(26.82333, 23.921665, 27.758469, 23.718578, 28.87309, 23.718563); ((GeneralPath)shape).curveTo(30.157719, 23.718578, 31.281775, 24.02557, 32.245266, 24.639536); ((GeneralPath)shape).curveTo(33.218178, 25.244085, 33.969124, 26.127274, 34.498108, 27.289103); ((GeneralPath)shape).curveTo(35.036507, 28.44151, 35.305714, 29.81116, 35.30573, 31.398058); ((GeneralPath)shape).curveTo(35.305714, 32.56935, 35.15458, 33.64618, 34.85233, 34.628544); ((GeneralPath)shape).curveTo(34.55949, 35.601475, 34.129704, 36.446877, 33.562965, 37.16476); ((GeneralPath)shape).curveTo(32.9962, 37.88265, 32.306652, 38.439953, 31.49432, 38.83668); ((GeneralPath)shape).curveTo(30.691408, 39.22396, 29.803497, 39.417603, 28.830585, 39.417603); ((GeneralPath)shape).curveTo(28.235485, 39.417603, 27.673456, 39.346756, 27.144497, 39.20507); ((GeneralPath)shape).curveTo(26.624966, 39.06338, 26.18101, 38.87919, 25.81263, 38.652485); ((GeneralPath)shape).curveTo(25.444233, 38.41634, 25.127796, 38.17547, 24.86332, 37.92988); ((GeneralPath)shape).curveTo(24.608274, 37.684284, 24.268223, 37.3159, 23.843164, 36.82471); ((GeneralPath)shape).lineTo(23.843164, 37.207268); ((GeneralPath)shape).curveTo(23.843159, 37.9346, 23.668411, 38.487183, 23.318918, 38.865017); ((GeneralPath)shape).curveTo(22.969418, 39.233406, 22.525461, 39.417603, 21.987051, 39.417603); ((GeneralPath)shape).curveTo(21.439188, 39.417603, 20.999954, 39.233406, 20.669352, 38.865017); ((GeneralPath)shape).curveTo(20.34819, 38.487183, 20.18761, 37.9346, 20.187613, 37.207268); ((GeneralPath)shape).lineTo(20.187613, 20.31805); ((GeneralPath)shape).curveTo(20.18761, 19.534063, 20.343468, 18.943695, 20.655184, 18.54695); ((GeneralPath)shape).curveTo(20.976341, 18.140799, 21.420296, 17.937712, 21.987051, 17.93769); ((GeneralPath)shape).curveTo(22.582136, 17.937712, 23.04026, 18.131351, 23.361425, 18.518612); ((GeneralPath)shape).curveTo(23.68258, 18.896467, 23.843159, 19.439604, 23.843164, 20.148026); ((GeneralPath)shape).moveTo(24.02736, 31.638927); ((GeneralPath)shape).curveTo(24.027353, 33.178608, 24.37685, 34.364063, 25.075851, 35.195297); ((GeneralPath)shape).curveTo(25.784285, 36.01709, 26.709978, 36.427986, 27.852938, 36.427982); ((GeneralPath)shape).curveTo(28.825851, 36.427986, 29.66181, 36.007645, 30.360815, 35.166958); ((GeneralPath)shape).curveTo(31.069244, 34.316837, 31.423464, 33.103043, 31.423475, 31.525576); ((GeneralPath)shape).curveTo(31.423464, 30.50543, 31.277052, 29.626966, 30.984243, 28.890179); ((GeneralPath)shape).curveTo(30.691408, 28.153412, 30.275791, 27.58666, 29.737389, 27.18992); ((GeneralPath)shape).curveTo(29.198963, 26.78376, 28.570812, 26.580675, 27.852938, 26.580664); ((GeneralPath)shape).curveTo(27.11615, 26.580675, 26.459663, 26.78376, 25.883472, 27.18992); ((GeneralPath)shape).curveTo(25.307268, 27.58666, 24.853867, 28.16758, 24.523268, 28.932686); ((GeneralPath)shape).curveTo(24.192656, 29.688364, 24.027353, 30.590443, 24.02736, 31.638927); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_0_4); g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha)); AffineTransform defaultTransform__0_0_5 = g.getTransform(); g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f)); // _0_0_5 paint = new Color(0, 0, 0, 255); shape = new GeneralPath(); ((GeneralPath)shape).moveTo(39.201935, 12.649522); ((GeneralPath)shape).curveTo(39.201927, 12.84475, 39.18891, 13.13107, 39.16289, 13.508484); ((GeneralPath)shape).curveTo(39.149868, 13.8729, 39.14336, 14.139699, 39.143368, 14.308881); ((GeneralPath)shape).lineTo(36.41031, 14.308881); ((GeneralPath)shape).lineTo(36.41031, 11.907691); ((GeneralPath)shape).curveTo(36.4103, 11.439177, 36.15001, 11.204915, 35.629433, 11.204904); ((GeneralPath)shape).curveTo(35.108845, 11.204915, 34.848553, 11.439177, 34.848557, 11.907691); ((GeneralPath)shape).lineTo(34.848557, 19.618828); ((GeneralPath)shape).curveTo(34.848553, 20.100368, 35.108845, 20.341139, 35.629433, 20.341137); ((GeneralPath)shape).curveTo(36.15001, 20.341139, 36.4103, 20.100368, 36.41031, 19.618828); ((GeneralPath)shape).lineTo(36.41031, 17.061464); ((GeneralPath)shape).lineTo(39.143368, 17.061464); ((GeneralPath)shape).lineTo(39.143368, 19.560263); ((GeneralPath)shape).curveTo(39.14336, 20.328123, 38.726894, 20.913778, 37.89397, 21.31723); ((GeneralPath)shape).curveTo(37.23022, 21.642595, 36.475376, 21.805277, 35.629433, 21.805277); ((GeneralPath)shape).curveTo(34.770466, 21.805277, 34.01562, 21.642595, 33.364895, 21.31723); ((GeneralPath)shape).curveTo(32.531963, 20.913778, 32.115498, 20.328123, 32.115498, 19.560263); ((GeneralPath)shape).lineTo(32.115498, 12.044344); ((GeneralPath)shape).curveTo(32.115498, 10.599737, 33.286808, 9.877429, 35.629433, 9.877418); ((GeneralPath)shape).curveTo(36.80074, 9.877429, 37.6597, 10.053126, 38.206318, 10.404508); ((GeneralPath)shape).curveTo(38.870056, 10.833999, 39.201927, 11.582337, 39.201935, 12.649522); g.setPaint(paint); g.fill(shape); g.setTransform(defaultTransform__0_0_5); 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_font() { 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(); } }