/plugins/Substance/trunk/substance-6.1/substance/src/tools/jitterbug/substance.java

# · Java · 116 lines · 69 code · 10 blank · 37 comment · 3 complexity · 23dea12fd504f600ed8cd6d9a34c4857 MD5 · raw file

  1. package tools.jitterbug;
  2. import java.awt.*;
  3. import java.awt.geom.*;
  4. /**
  5. * This class has been automatically generated using <a
  6. * href="https://flamingo.dev.java.net">Flamingo SVG transcoder</a>.
  7. */
  8. public class substance {
  9. /**
  10. * Paints the transcoded SVG image on the specified graphics context. You
  11. * can install a custom transformation on the graphics context to scale the
  12. * image.
  13. *
  14. * @param g
  15. * Graphics context.
  16. */
  17. public static void paint(Graphics2D g) {
  18. Shape shape = null;
  19. Paint paint = null;
  20. Stroke stroke = null;
  21. float origAlpha = 1.0f;
  22. Composite origComposite = ((Graphics2D)g).getComposite();
  23. if (origComposite instanceof AlphaComposite) {
  24. AlphaComposite origAlphaComposite =
  25. (AlphaComposite)origComposite;
  26. if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER) {
  27. origAlpha = origAlphaComposite.getAlpha();
  28. }
  29. }
  30. AffineTransform defaultTransform_ = g.getTransform();
  31. //
  32. g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
  33. AffineTransform defaultTransform__0 = g.getTransform();
  34. g.transform(new AffineTransform(1.3333326578140259f, 0.0f, 0.0f, 1.3333326578140259f, 5.900062114960747E-4f, -0.0f));
  35. // _0
  36. g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
  37. AffineTransform defaultTransform__0_0 = g.getTransform();
  38. g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
  39. // _0_0
  40. g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
  41. AffineTransform defaultTransform__0_0_0 = g.getTransform();
  42. g.transform(new AffineTransform(-0.752575781317554f, 0.6585056517405703f, -0.6585056517405703f, -0.752575781317554f, 310.2049865722656f, 167.59800720214844f));
  43. // _0_0_0
  44. g.setComposite(AlphaComposite.getInstance(3, 1.0f * origAlpha));
  45. AffineTransform defaultTransform__0_0_0_0 = g.getTransform();
  46. g.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));
  47. // _0_0_0_0
  48. paint = new Color(0, 0, 0, 255);
  49. stroke = new BasicStroke(20.0f,1,1,3.0f,null,0.0f);
  50. shape = new GeneralPath();
  51. ((GeneralPath)shape).moveTo(0.0, 139.41);
  52. ((GeneralPath)shape).curveTo(23.64, 156.92, 46.62, 183.6, 74.01, 184.91);
  53. ((GeneralPath)shape).curveTo(95.69, 185.94, 120.12, 171.07, 142.34, 167.23);
  54. ((GeneralPath)shape).curveTo(158.16, 164.5, 172.85, 167.36, 184.27, 175.05);
  55. ((GeneralPath)shape).curveTo(195.56, 182.66, 203.65, 195.0, 201.61, 205.97);
  56. ((GeneralPath)shape).curveTo(200.21, 213.5, 194.06, 220.39, 186.75, 222.32);
  57. ((GeneralPath)shape).curveTo(176.88, 224.94, 164.91, 218.53, 157.54, 209.84);
  58. ((GeneralPath)shape).curveTo(148.63, 199.34, 146.44, 185.49, 147.06, 170.49);
  59. ((GeneralPath)shape).curveTo(147.72, 154.46, 151.57, 137.12, 150.12, 118.98);
  60. ((GeneralPath)shape).curveTo(148.86, 103.29, 143.64, 86.99, 134.79, 74.2);
  61. ((GeneralPath)shape).curveTo(120.67, 53.81, 97.33, 42.33, 75.36, 45.25);
  62. ((GeneralPath)shape).curveTo(63.41, 46.84, 51.87, 52.69, 44.12, 61.07);
  63. ((GeneralPath)shape).curveTo(31.55, 74.67, 28.96, 94.96, 39.07, 110.9);
  64. ((GeneralPath)shape).curveTo(50.18, 128.41, 76.62, 140.68, 95.67, 139.41);
  65. g.setPaint(paint);
  66. g.setStroke(stroke);
  67. g.draw(shape);
  68. g.setTransform(defaultTransform__0_0_0_0);
  69. g.setTransform(defaultTransform__0_0_0);
  70. g.setTransform(defaultTransform__0_0);
  71. g.setTransform(defaultTransform__0);
  72. g.setTransform(defaultTransform_);
  73. }
  74. /**
  75. * Returns the X of the bounding box of the original SVG image.
  76. *
  77. * @return The X of the bounding box of the original SVG image.
  78. */
  79. public static int getOrigX() {
  80. return -5;
  81. }
  82. /**
  83. * Returns the Y of the bounding box of the original SVG image.
  84. *
  85. * @return The Y of the bounding box of the original SVG image.
  86. */
  87. public static int getOrigY() {
  88. return -21;
  89. }
  90. /**
  91. * Returns the width of the bounding box of the original SVG image.
  92. *
  93. * @return The width of the bounding box of the original SVG image.
  94. */
  95. public static int getOrigWidth() {
  96. return 403;
  97. }
  98. /**
  99. * Returns the height of the bounding box of the original SVG image.
  100. *
  101. * @return The height of the bounding box of the original SVG image.
  102. */
  103. public static int getOrigHeight() {
  104. return 400;
  105. }
  106. }