Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.geom.*;
- import java.awt.image.*;
- import static java.awt.Color.*;
- import static java.awt.MultipleGradientPaint.CycleMethod.*;
- import static java.awt.MultipleGradientPaint.ColorSpaceType.*;
- /**
- * This class has been automatically generated using
- * <a href="http://ebourg.github.io/flamingo-svg-transcoder/">Flamingo SVG transcoder</a>.
- */
- public class Drawing implements javax.swing.Icon {
- /** The width of this icon. */
- private int width;
- /** The height of this icon. */
- private int height;
- /** The rendered image. */
- private BufferedImage image;
- /**
- * Creates a new transcoded SVG image.
- */
- public Drawing() {
- this(375, 258);
- }
- /**
- * Creates a new transcoded SVG image.
- */
- public Drawing(int width, int height) {
- this.width = width;
- this.height = height;
- }
- @Override
- public int getIconHeight() {
- return height;
- }
- @Override
- public int getIconWidth() {
- return width;
- }
- @Override
- public void paintIcon(Component c, Graphics g, int x, int y) {
- if (image == null) {
- image = new BufferedImage(getIconWidth(), getIconHeight(), BufferedImage.TYPE_INT_ARGB);
- double coef = Math.min((double) width / (double) 375, (double) height / (double) 258);
- Graphics2D g2d = image.createGraphics();
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.scale(coef, coef);
- paint(g2d);
- g2d.dispose();
- }
- g.drawImage(image, x, y, null);
- }
- /**
- * Paints the transcoded SVG image on the specified graphics context.
- *
- * @param g Graphics context.
- */
- private static void paint(Graphics2D g) {
- Shape shape = null;
- float origAlpha = 1.0f;
- java.util.LinkedList<AffineTransform> transformations = new java.util.LinkedList<AffineTransform>();
- //
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(3.7795277f, 0, 0, 3.7795277f, 0, 5.7671015E-5f));
- // _0
- // _0_0
- // _0_0_0
- shape = new Ellipse2D.Double(93.49911499023438, 22.539958953857422, 31.739280700683594, 30.416364669799805);
- g.setPaint(BLACK);
- g.setStroke(new BasicStroke(0.2752997f, 0, 0, 4));
- g.draw(shape);
- // _0_0_1
- shape = new Ellipse2D.Double(64.23841857910156, 17.280088424682617, 53.70768356323242, 37.83268356323242);
- g.setPaint(WHITE);
- g.fill(shape);
- g.setPaint(BLACK);
- g.setStroke(new BasicStroke(0.22951913f, 0, 0, 4));
- g.draw(shape);
- // _0_0_2
- shape = new Rectangle2D.Double(62.140167236328125, 12.444101333618164, 47.573978424072266, 24.23537826538086);
- g.setPaint(WHITE);
- g.fill(shape);
- // _0_0_3
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(64.2087, 36.716145);
- ((GeneralPath) shape).curveTo(64.2087, 36.716145, 63.830727, 31.755207, 63.216515, 35.58222);
- g.setPaint(BLACK);
- g.setStroke(new BasicStroke(0.26458332f, 0, 0, 4));
- g.draw(shape);
- // _0_0_4
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(63.21652, 35.58222);
- ((GeneralPath) shape).curveTo(63.21652, 35.58222, 61.071087, 47.771168, 59.73474, 43.895756);
- ((GeneralPath) shape).curveTo(56.66114, 35.2095, 58.131123, 32.1359, 56.66114, 35.2095);
- g.draw(shape);
- // _0_0_5
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(56.66114, 35.2095);
- ((GeneralPath) shape).curveTo(55.5625, 39.692707, 55.60975, 40.425037, 55.60975, 40.425037);
- g.draw(shape);
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(0.8660254f, -0.5f, 0.5f, 0.8660254f, 0, 0));
- // _0_0_6
- shape = new Ellipse2D.Double(8.177994728088379, 38.75354766845703, 22.35439109802246, 29.704303741455078);
- g.setPaint(WHITE);
- g.fill(shape);
- g.setPaint(BLACK);
- g.setStroke(new BasicStroke(0.3608328f, 0, 0, 4));
- g.draw(shape);
- g.setTransform(transformations.pop()); // _0_0_6
- // _0_0_7
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(39.28862, 48.57297);
- ((GeneralPath) shape).curveTo(66.282845, 64.74278, 70.69279, 56.32379, 66.282845, 64.74278);
- g.setStroke(new BasicStroke(0.26458332f, 0, 0, 4));
- g.draw(shape);
- // _0_0_8
- shape = new Rectangle2D.Double(29.533283233642578, 21.712385177612305, 21.247926712036133, 27.528762817382812);
- g.setPaint(WHITE);
- g.fill(shape);
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(0.9947872f, 0.10197258f, -0.10032884f, 0.99495435f, 0, 0));
- // _0_0_9
- shape = new Rectangle2D.Double(51.518306732177734, 21.962921142578125, 7.769160747528076, 15.631926536560059);
- g.fill(shape);
- g.setTransform(transformations.pop()); // _0_0_9
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(0.93055636f, 0.36614877f, -0.16104122f, 0.9869477f, 0, 0));
- // _0_0_10
- shape = new Ellipse2D.Double(48.721580505371094, 30.30084800720215, 3.7043793201446533, 2.741414785385132);
- g.fill(shape);
- g.setPaint(BLACK);
- g.setStroke(new BasicStroke(0.26878935f, 0, 0, 4));
- g.draw(shape);
- g.setTransform(transformations.pop()); // _0_0_10
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(0.9659258f, -0.25881904f, 0.25881904f, 0.9659258f, 0, 0));
- // _0_0_11
- shape = new Ellipse2D.Double(41.714134216308594, 59.618247985839844, 0.4009042978286743, 2.1381561756134033);
- g.fill(shape);
- g.setStroke(new BasicStroke(0.26458332f, 0, 0, 4));
- g.draw(shape);
- g.setTransform(transformations.pop()); // _0_0_11
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(0.9659258f, -0.25881904f, 0.25881904f, 0.9659258f, 0, 0));
- // _0_0_12
- shape = new Ellipse2D.Double(43.392189025878906, 59.93424987792969, 0.4009042978286743, 2.405425548553467);
- g.fill(shape);
- g.draw(shape);
- g.setTransform(transformations.pop()); // _0_0_12
- // _0_0_13
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(55.458424, 56.457424);
- ((GeneralPath) shape).curveTo(61.739258, 55.254715, 61.605625, 53.918365, 61.605625, 53.918365);
- g.draw(shape);
- // _0_0_14
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(66.282845, 64.74278);
- ((GeneralPath) shape).lineTo(60.937454, 74.36449);
- g.draw(shape);
- // _0_0_15
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(108.37779, 52.849285);
- ((GeneralPath) shape).lineTo(115.59407, 76.10174);
- g.draw(shape);
- transformations.push(g.getTransform());
- g.transform(new AffineTransform(0.9165458f, -0.39992973f, 0.26577786f, 0.9640343f, 0, 0));
- // _0_0_16
- shape = new Rectangle2D.Double(86.037841796875, 91.03500366210938, 5.16782283782959, 3.1380815505981445);
- g.setPaint(WHITE);
- g.fill(shape);
- g.setTransform(transformations.pop()); // _0_0_16
- // _0_0_17
- shape = new GeneralPath();
- ((GeneralPath) shape).moveTo(60.93745, 74.36448);
- ((GeneralPath) shape).curveTo(60.93745, 74.36448, 60.239952, 78.10454, 63.547245, 73.71056);
- ((GeneralPath) shape).curveTo(66.85454, 69.31659, 70.55915, 71.55815, 70.55915, 71.55815);
- ((GeneralPath) shape).curveTo(70.55915, 71.55815, 74.9691, 75.834465, 74.56819, 79.17533);
- ((GeneralPath) shape).curveTo(74.16729, 82.516205, 75.217255, 78.15178, 75.217255, 78.15178);
- ((GeneralPath) shape).curveTo(75.217255, 78.15178, 75.90454, 68.48455, 89.535286, 67.950005);
- ((GeneralPath) shape).curveTo(103.16604, 67.41547, 108.51143, 79.70987, 108.51143, 79.70987);
- ((GeneralPath) shape).curveTo(108.51143, 79.70987, 108.244156, 73.56267, 109.31324, 72.22632);
- ((GeneralPath) shape).curveTo(110.38231, 70.88997, 115.59407, 76.10172, 115.59407, 76.10172);
- g.setPaint(BLACK);
- g.draw(shape);
- g.setTransform(transformations.pop()); // _0
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement