1 7 package com.sun.java.swing.plaf.nimbus; 8 9 import java.awt.*; 10 import java.awt.geom.*; 11 import java.awt.image.*; 12 import javax.swing.*; 13 import com.sun.java.swing.Painter; 14 15 17 public final class TabbedPaneTabbedPaneTabPainter extends AbstractRegionPainter { 18 static final int BACKGROUND_ENABLED = 1; 23 static final int BACKGROUND_ENABLED_MOUSEOVER = 2; 24 static final int BACKGROUND_ENABLED_PRESSED = 3; 25 static final int BACKGROUND_DISABLED = 4; 26 static final int BACKGROUND_SELECTED_DISABLED = 5; 27 static final int BACKGROUND_SELECTED = 6; 28 static final int BACKGROUND_SELECTED_MOUSEOVER = 7; 29 static final int BACKGROUND_SELECTED_PRESSED = 8; 30 static final int BACKGROUND_SELECTED_FOCUSED = 9; 31 static final int BACKGROUND_SELECTED_MOUSEOVER_FOCUSED = 10; 32 static final int BACKGROUND_SELECTED_PRESSED_FOCUSED = 11; 33 34 35 private int state; private PaintContext ctx; 37 38 private Path2D path = new Path2D.Float(); 40 private Rectangle2D rect = new Rectangle2D.Float(0, 0, 0, 0); 41 private RoundRectangle2D roundRect = new RoundRectangle2D.Float(0, 0, 0, 0, 0, 0); 42 private Ellipse2D ellipse = new Ellipse2D.Float(0, 0, 0, 0); 43 44 private Color color1 = decodeColor("nimbusBase", 0.032459438f, -0.55535716f, -0.109803945f, 0); 48 private Color color2 = decodeColor("nimbusBase", 0.08801502f, 0.3642857f, -0.4784314f, 0); 49 private Color color3 = decodeColor("nimbusBase", 0.08801502f, -0.63174605f, 0.43921566f, 0); 50 private Color color4 = decodeColor("nimbusBase", 0.05468172f, -0.6145278f, 0.37647057f, 0); 51 private Color color5 = decodeColor("nimbusBase", 0.032459438f, -0.5953556f, 0.32549018f, 0); 52 private Color color6 = decodeColor("nimbusBase", 0.032459438f, -0.54616207f, -0.02352941f, 0); 53 private Color color7 = decodeColor("nimbusBase", 0.08801502f, -0.6317773f, 0.4470588f, 0); 54 private Color color8 = decodeColor("nimbusBase", 0.021348298f, -0.61547136f, 0.41960782f, 0); 55 private Color color9 = decodeColor("nimbusBase", 0.032459438f, -0.5985242f, 0.39999998f, 0); 56 private Color color10 = decodeColor("nimbusBase", 0.08801502f, 0.3642857f, -0.52156866f, 0); 57 private Color color11 = decodeColor("nimbusBase", 0.027408898f, -0.5847884f, 0.2980392f, 0); 58 private Color color12 = decodeColor("nimbusBase", 0.035931647f, -0.5553123f, 0.23137254f, 0); 59 private Color color13 = decodeColor("nimbusBase", 0.029681683f, -0.5281874f, 0.18039215f, 0); 60 private Color color14 = decodeColor("nimbusBase", 0.03801495f, -0.5456242f, 0.3215686f, 0); 61 private Color color15 = decodeColor("nimbusBase", 0.032459438f, -0.59181184f, 0.25490195f, 0); 62 private Color color16 = decodeColor("nimbusBase", 0.05468172f, -0.58308274f, 0.19607842f, 0); 63 private Color color17 = decodeColor("nimbusBase", 0.046348333f, -0.6006266f, 0.34509802f, 0); 64 private Color color18 = decodeColor("nimbusBase", 0.046348333f, -0.60015875f, 0.3333333f, 0); 65 private Color color19 = decodeColor("nimbusBase", 0.004681647f, -0.6197143f, 0.43137252f, 0); 66 private Color color20 = decodeColor("nimbusBase", 7.13408E-4f, -0.543609f, 0.34509802f, 0); 67 private Color color21 = decodeColor("nimbusBase", -0.0020751357f, -0.45610264f, 0.2588235f, 0); 68 private Color color22 = decodeColor("nimbusBase", 5.1498413E-4f, -0.43866998f, 0.24705881f, 0); 69 private Color color23 = decodeColor("nimbusBase", 5.1498413E-4f, -0.44879842f, 0.29019606f, 0); 70 private Color color24 = decodeColor("nimbusBase", 5.1498413E-4f, -0.08776909f, -0.2627451f, 0); 71 private Color color25 = decodeColor("nimbusBase", 0.06332368f, 0.3642857f, -0.4431373f, 0); 72 private Color color26 = decodeColor("nimbusBase", 0.004681647f, -0.6198413f, 0.43921566f, 0); 73 private Color color27 = decodeColor("nimbusBase", -0.0022627711f, -0.5335866f, 0.372549f, 0); 74 private Color color28 = decodeColor("nimbusBase", -0.0017285943f, -0.4608264f, 0.32549018f, 0); 75 private Color color29 = decodeColor("nimbusBase", 5.1498413E-4f, -0.4555341f, 0.3215686f, 0); 76 private Color color30 = decodeColor("nimbusBase", 5.1498413E-4f, -0.46404046f, 0.36470586f, 0); 77 private Color color31 = decodeColor("nimbusBase", -0.57865167f, -0.6357143f, -0.54901963f, 0); 78 private Color color32 = decodeColor("nimbusBase", -4.2033195E-4f, -0.38050595f, 0.20392156f, 0); 79 private Color color33 = decodeColor("nimbusBase", 0.0013483167f, -0.16401619f, 0.0745098f, 0); 80 private Color color34 = decodeColor("nimbusBase", -0.0010001659f, -0.01599598f, 0.007843137f, 0); 81 private Color color35 = decodeColor("nimbusBase", 0.0f, 0.0f, 0.0f, 0); 82 private Color color36 = decodeColor("nimbusBase", 0.0018727183f, -0.038398862f, 0.035294116f, 0); 83 private Color color37 = decodeColor("nimbusFocus", 0.0f, 0.0f, 0.0f, 0); 84 85 86 private Object [] componentColors; 88 89 public TabbedPaneTabbedPaneTabPainter(PaintContext ctx, int state) { 90 super(); 91 this.state = state; 92 this.ctx = ctx; 93 } 94 95 @Override 96 protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object [] extendedCacheKeys) { 97 componentColors = extendedCacheKeys; 99 switch(state) { 102 case BACKGROUND_ENABLED: paintBackgroundEnabled(g); break; 103 case BACKGROUND_ENABLED_MOUSEOVER: paintBackgroundEnabledAndMouseOver(g); break; 104 case BACKGROUND_ENABLED_PRESSED: paintBackgroundEnabledAndPressed(g); break; 105 case BACKGROUND_DISABLED: paintBackgroundDisabled(g); break; 106 case BACKGROUND_SELECTED_DISABLED: paintBackgroundSelectedAndDisabled(g); break; 107 case BACKGROUND_SELECTED: paintBackgroundSelected(g); break; 108 case BACKGROUND_SELECTED_MOUSEOVER: paintBackgroundSelectedAndMouseOver(g); break; 109 case BACKGROUND_SELECTED_PRESSED: paintBackgroundSelectedAndPressed(g); break; 110 case BACKGROUND_SELECTED_FOCUSED: paintBackgroundSelectedAndFocused(g); break; 111 case BACKGROUND_SELECTED_MOUSEOVER_FOCUSED: paintBackgroundSelectedAndMouseOverAndFocused(g); break; 112 case BACKGROUND_SELECTED_PRESSED_FOCUSED: paintBackgroundSelectedAndPressedAndFocused(g); break; 113 114 } 115 } 116 117 118 119 @Override 120 protected final PaintContext getPaintContext() { 121 return ctx; 122 } 123 124 private void paintBackgroundEnabled(Graphics2D g) { 125 path = decodePath1(); 126 g.setPaint(decodeGradient1(path)); 127 g.fill(path); 128 path = decodePath2(); 129 g.setPaint(decodeGradient2(path)); 130 g.fill(path); 131 132 } 133 134 private void paintBackgroundEnabledAndMouseOver(Graphics2D g) { 135 path = decodePath1(); 136 g.setPaint(decodeGradient3(path)); 137 g.fill(path); 138 path = decodePath2(); 139 g.setPaint(decodeGradient4(path)); 140 g.fill(path); 141 142 } 143 144 private void paintBackgroundEnabledAndPressed(Graphics2D g) { 145 path = decodePath3(); 146 g.setPaint(decodeGradient5(path)); 147 g.fill(path); 148 path = decodePath4(); 149 g.setPaint(decodeGradient6(path)); 150 g.fill(path); 151 152 } 153 154 private void paintBackgroundDisabled(Graphics2D g) { 155 path = decodePath5(); 156 g.setPaint(decodeGradient7(path)); 157 g.fill(path); 158 path = decodePath6(); 159 g.setPaint(decodeGradient8(path)); 160 g.fill(path); 161 162 } 163 164 private void paintBackgroundSelectedAndDisabled(Graphics2D g) { 165 path = decodePath7(); 166 g.setPaint(decodeGradient7(path)); 167 g.fill(path); 168 path = decodePath2(); 169 g.setPaint(decodeGradient9(path)); 170 g.fill(path); 171 172 } 173 174 private void paintBackgroundSelected(Graphics2D g) { 175 path = decodePath7(); 176 g.setPaint(decodeGradient10(path)); 177 g.fill(path); 178 path = decodePath2(); 179 g.setPaint(decodeGradient9(path)); 180 g.fill(path); 181 182 } 183 184 private void paintBackgroundSelectedAndMouseOver(Graphics2D g) { 185 path = decodePath8(); 186 g.setPaint(decodeGradient11(path)); 187 g.fill(path); 188 path = decodePath9(); 189 g.setPaint(decodeGradient12(path)); 190 g.fill(path); 191 192 } 193 194 private void paintBackgroundSelectedAndPressed(Graphics2D g) { 195 path = decodePath8(); 196 g.setPaint(decodeGradient13(path)); 197 g.fill(path); 198 path = decodePath9(); 199 g.setPaint(decodeGradient14(path)); 200 g.fill(path); 201 202 } 203 204 private void paintBackgroundSelectedAndFocused(Graphics2D g) { 205 path = decodePath1(); 206 g.setPaint(decodeGradient10(path)); 207 g.fill(path); 208 path = decodePath10(); 209 g.setPaint(decodeGradient9(path)); 210 g.fill(path); 211 path = decodePath11(); 212 g.setPaint(color37); 213 g.fill(path); 214 215 } 216 217 private void paintBackgroundSelectedAndMouseOverAndFocused(Graphics2D g) { 218 path = decodePath12(); 219 g.setPaint(decodeGradient11(path)); 220 g.fill(path); 221 path = decodePath13(); 222 g.setPaint(decodeGradient12(path)); 223 g.fill(path); 224 path = decodePath14(); 225 g.setPaint(color37); 226 g.fill(path); 227 228 } 229 230 private void paintBackgroundSelectedAndPressedAndFocused(Graphics2D g) { 231 path = decodePath12(); 232 g.setPaint(decodeGradient13(path)); 233 g.fill(path); 234 path = decodePath13(); 235 g.setPaint(decodeGradient14(path)); 236 g.fill(path); 237 path = decodePath14(); 238 g.setPaint(color37); 239 g.fill(path); 240 241 } 242 243 244 245 private Path2D decodePath1() { 246 path.reset(); 247 path.moveTo(decodeX(0.0f), decodeY(0.71428573f)); 248 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeAnchorX(0.7142857313156128f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(0.71428573f), decodeY(0.0f)); 249 path.curveTo(decodeAnchorX(0.7142857313156128f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(2.2857143878936768f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(2.2857144f), decodeY(0.0f)); 250 path.curveTo(decodeAnchorX(2.2857143878936768f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeX(3.0f), decodeY(0.71428573f)); 251 path.curveTo(decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeX(3.0f), decodeY(3.0f)); 252 path.lineTo(decodeX(0.0f), decodeY(3.0f)); 253 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeX(0.0f), decodeY(0.71428573f)); 254 path.closePath(); 255 return path; 256 } 257 258 private Path2D decodePath2() { 259 path.reset(); 260 path.moveTo(decodeX(0.14285715f), decodeY(2.0f)); 261 path.curveTo(decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.5555555555555536f), decodeX(0.14285715f), decodeY(0.85714287f)); 262 path.curveTo(decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.5555555555555536f), decodeAnchorX(0.8571428656578064f, -3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(0.85714287f), decodeY(0.14285715f)); 263 path.curveTo(decodeAnchorX(0.8571428656578064f, 3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.142857074737549f, -3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(2.142857f), decodeY(0.14285715f)); 264 path.curveTo(decodeAnchorX(2.142857074737549f, 3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.277777777777777f), decodeX(2.857143f), decodeY(0.85714287f)); 265 path.curveTo(decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.277777777777777f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(2.857143f), decodeY(2.0f)); 266 path.lineTo(decodeX(0.14285715f), decodeY(2.0f)); 267 path.closePath(); 268 return path; 269 } 270 271 private Path2D decodePath3() { 272 path.reset(); 273 path.moveTo(decodeX(0.0f), decodeY(0.71428573f)); 274 path.curveTo(decodeAnchorX(0.0f, 0.05555555555555555f), decodeAnchorY(0.7142857313156128f, 2.6111111111111125f), decodeAnchorX(0.8333333134651184f, -2.5000000000000018f), decodeAnchorY(0.0f, 0.0f), decodeX(0.8333333f), decodeY(0.0f)); 275 path.curveTo(decodeAnchorX(0.8333333134651184f, 2.5000000000000018f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(2.2857143878936768f, -2.7222222222222143f), decodeAnchorY(0.0f, 0.0f), decodeX(2.2857144f), decodeY(0.0f)); 276 path.curveTo(decodeAnchorX(2.2857143878936768f, 2.7222222222222143f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(3.0f, -0.055555555555557135f), decodeAnchorY(0.7142857313156128f, -2.722222222222223f), decodeX(3.0f), decodeY(0.71428573f)); 277 path.curveTo(decodeAnchorX(3.0f, 0.055555555555557135f), decodeAnchorY(0.7142857313156128f, 2.722222222222223f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeX(3.0f), decodeY(3.0f)); 278 path.lineTo(decodeX(0.0f), decodeY(3.0f)); 279 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeAnchorX(0.0f, -0.05555555555555555f), decodeAnchorY(0.7142857313156128f, -2.6111111111111125f), decodeX(0.0f), decodeY(0.71428573f)); 280 path.closePath(); 281 return path; 282 } 283 284 private Path2D decodePath4() { 285 path.reset(); 286 path.moveTo(decodeX(0.16666667f), decodeY(2.0f)); 287 path.curveTo(decodeAnchorX(0.1666666716337204f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(0.1666666716337204f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.6666666666666643f), decodeX(0.16666667f), decodeY(0.85714287f)); 288 path.curveTo(decodeAnchorX(0.1666666716337204f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.6666666666666643f), decodeAnchorX(1.0f, -3.5555555555555536f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(1.0f), decodeY(0.14285715f)); 289 path.curveTo(decodeAnchorX(1.0f, 3.5555555555555536f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.142857074737549f, -3.500000000000014f), decodeAnchorY(0.1428571492433548f, 0.05555555555555558f), decodeX(2.142857f), decodeY(0.14285715f)); 290 path.curveTo(decodeAnchorX(2.142857074737549f, 3.500000000000014f), decodeAnchorY(0.1428571492433548f, -0.05555555555555558f), decodeAnchorX(2.857142925262451f, 0.055555555555557135f), decodeAnchorY(0.8571428656578064f, -3.6666666666666643f), decodeX(2.857143f), decodeY(0.85714287f)); 291 path.curveTo(decodeAnchorX(2.857142925262451f, -0.055555555555557135f), decodeAnchorY(0.8571428656578064f, 3.6666666666666643f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(2.857143f), decodeY(2.0f)); 292 path.lineTo(decodeX(0.16666667f), decodeY(2.0f)); 293 path.closePath(); 294 return path; 295 } 296 297 private Path2D decodePath5() { 298 path.reset(); 299 path.moveTo(decodeX(0.0f), decodeY(0.8333333f)); 300 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.8333333134651184f, -3.0f), decodeAnchorX(0.7142857313156128f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(0.71428573f), decodeY(0.0f)); 301 path.curveTo(decodeAnchorX(0.7142857313156128f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(2.2857143878936768f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(2.2857144f), decodeY(0.0f)); 302 path.curveTo(decodeAnchorX(2.2857143878936768f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.8333333134651184f, -3.0f), decodeX(3.0f), decodeY(0.8333333f)); 303 path.curveTo(decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.8333333134651184f, 3.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeX(3.0f), decodeY(3.0f)); 304 path.lineTo(decodeX(0.0f), decodeY(3.0f)); 305 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.8333333134651184f, 3.0f), decodeX(0.0f), decodeY(0.8333333f)); 306 path.closePath(); 307 return path; 308 } 309 310 private Path2D decodePath6() { 311 path.reset(); 312 path.moveTo(decodeX(0.14285715f), decodeY(2.0f)); 313 path.curveTo(decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(1.0f, 3.5555555555555536f), decodeX(0.14285715f), decodeY(1.0f)); 314 path.curveTo(decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(1.0f, -3.5555555555555536f), decodeAnchorX(0.8571428656578064f, -3.444444444444443f), decodeAnchorY(0.1666666716337204f, 0.0f), decodeX(0.85714287f), decodeY(0.16666667f)); 315 path.curveTo(decodeAnchorX(0.8571428656578064f, 3.444444444444443f), decodeAnchorY(0.1666666716337204f, 0.0f), decodeAnchorX(2.142857074737549f, -3.333333333333343f), decodeAnchorY(0.1666666716337204f, 0.0f), decodeX(2.142857f), decodeY(0.16666667f)); 316 path.curveTo(decodeAnchorX(2.142857074737549f, 3.333333333333343f), decodeAnchorY(0.1666666716337204f, 0.0f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(1.0f, -3.277777777777777f), decodeX(2.857143f), decodeY(1.0f)); 317 path.curveTo(decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(1.0f, 3.277777777777777f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(2.857143f), decodeY(2.0f)); 318 path.lineTo(decodeX(0.14285715f), decodeY(2.0f)); 319 path.closePath(); 320 return path; 321 } 322 323 private Path2D decodePath7() { 324 path.reset(); 325 path.moveTo(decodeX(0.0f), decodeY(0.71428573f)); 326 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeAnchorX(0.7142857313156128f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(0.71428573f), decodeY(0.0f)); 327 path.curveTo(decodeAnchorX(0.7142857313156128f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(2.2857143878936768f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(2.2857144f), decodeY(0.0f)); 328 path.curveTo(decodeAnchorX(2.2857143878936768f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeX(3.0f), decodeY(0.71428573f)); 329 path.curveTo(decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(3.0f), decodeY(2.0f)); 330 path.lineTo(decodeX(0.0f), decodeY(2.0f)); 331 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeX(0.0f), decodeY(0.71428573f)); 332 path.closePath(); 333 return path; 334 } 335 336 private Path2D decodePath8() { 337 path.reset(); 338 path.moveTo(decodeX(0.0f), decodeY(0.71428573f)); 339 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeAnchorX(0.5555555820465088f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(0.5555556f), decodeY(0.0f)); 340 path.curveTo(decodeAnchorX(0.5555555820465088f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(2.444444417953491f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(2.4444444f), decodeY(0.0f)); 341 path.curveTo(decodeAnchorX(2.444444417953491f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeX(3.0f), decodeY(0.71428573f)); 342 path.curveTo(decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(3.0f), decodeY(2.0f)); 343 path.lineTo(decodeX(0.0f), decodeY(2.0f)); 344 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeX(0.0f), decodeY(0.71428573f)); 345 path.closePath(); 346 return path; 347 } 348 349 private Path2D decodePath9() { 350 path.reset(); 351 path.moveTo(decodeX(0.11111111f), decodeY(2.0f)); 352 path.curveTo(decodeAnchorX(0.1111111119389534f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeAnchorX(0.1111111119389534f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.5555555555555536f), decodeX(0.11111111f), decodeY(0.85714287f)); 353 path.curveTo(decodeAnchorX(0.1111111119389534f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.5555555555555536f), decodeAnchorX(0.6666666865348816f, -3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(0.6666667f), decodeY(0.14285715f)); 354 path.curveTo(decodeAnchorX(0.6666666865348816f, 3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.3333332538604736f, -3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(2.3333333f), decodeY(0.14285715f)); 355 path.curveTo(decodeAnchorX(2.3333332538604736f, 3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.8888888359069824f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.277777777777777f), decodeX(2.8888888f), decodeY(0.85714287f)); 356 path.curveTo(decodeAnchorX(2.8888888359069824f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.277777777777777f), decodeAnchorX(2.8888888359069824f, 0.0f), decodeAnchorY(2.0f, 0.0f), decodeX(2.8888888f), decodeY(2.0f)); 357 path.lineTo(decodeX(0.11111111f), decodeY(2.0f)); 358 path.closePath(); 359 return path; 360 } 361 362 private Path2D decodePath10() { 363 path.reset(); 364 path.moveTo(decodeX(0.14285715f), decodeY(3.0f)); 365 path.curveTo(decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.5555555555555536f), decodeX(0.14285715f), decodeY(0.85714287f)); 366 path.curveTo(decodeAnchorX(0.1428571492433548f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.5555555555555536f), decodeAnchorX(0.8571428656578064f, -3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(0.85714287f), decodeY(0.14285715f)); 367 path.curveTo(decodeAnchorX(0.8571428656578064f, 3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.142857074737549f, -3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(2.142857f), decodeY(0.14285715f)); 368 path.curveTo(decodeAnchorX(2.142857074737549f, 3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.277777777777777f), decodeX(2.857143f), decodeY(0.85714287f)); 369 path.curveTo(decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.277777777777777f), decodeAnchorX(2.857142925262451f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeX(2.857143f), decodeY(3.0f)); 370 path.lineTo(decodeX(0.14285715f), decodeY(3.0f)); 371 path.closePath(); 372 return path; 373 } 374 375 private Path2D decodePath11() { 376 path.reset(); 377 path.moveTo(decodeX(1.4638889f), decodeY(2.25f)); 378 path.lineTo(decodeX(1.4652778f), decodeY(2.777778f)); 379 path.lineTo(decodeX(0.3809524f), decodeY(2.777778f)); 380 path.lineTo(decodeX(0.375f), decodeY(0.88095236f)); 381 path.curveTo(decodeAnchorX(0.375f, 0.0f), decodeAnchorY(0.8809523582458496f, -2.2500000000000004f), decodeAnchorX(0.8452380895614624f, -1.9166666666666647f), decodeAnchorY(0.380952388048172f, 0.0f), decodeX(0.8452381f), decodeY(0.3809524f)); 382 path.lineTo(decodeX(2.1011903f), decodeY(0.3809524f)); 383 path.curveTo(decodeAnchorX(2.1011903285980225f, 2.124999999999986f), decodeAnchorY(0.380952388048172f, 0.0f), decodeAnchorX(2.6309525966644287f, 0.0f), decodeAnchorY(0.863095223903656f, -2.5833333333333317f), decodeX(2.6309526f), decodeY(0.8630952f)); 384 path.lineTo(decodeX(2.625f), decodeY(2.7638886f)); 385 path.lineTo(decodeX(1.4666667f), decodeY(2.777778f)); 386 path.lineTo(decodeX(1.4638889f), decodeY(2.2361114f)); 387 path.lineTo(decodeX(2.3869045f), decodeY(2.222222f)); 388 path.lineTo(decodeX(2.375f), decodeY(0.86904764f)); 389 path.curveTo(decodeAnchorX(2.375f, -7.105427357601002E-15f), decodeAnchorY(0.8690476417541504f, -0.9166666666666679f), decodeAnchorX(2.095238208770752f, 1.0833333333333357f), decodeAnchorY(0.6071428656578064f, -1.7763568394002505E-15f), decodeX(2.0952382f), decodeY(0.60714287f)); 390 path.lineTo(decodeX(0.8333334f), decodeY(0.6130952f)); 391 path.curveTo(decodeAnchorX(0.8333333730697632f, -1.0f), decodeAnchorY(0.613095223903656f, 0.0f), decodeAnchorX(0.625f, 0.04166666666666696f), decodeAnchorY(0.8690476417541504f, -0.9583333333333339f), decodeX(0.625f), decodeY(0.86904764f)); 392 path.lineTo(decodeX(0.6130952f), decodeY(2.2361114f)); 393 path.lineTo(decodeX(1.4638889f), decodeY(2.25f)); 394 path.closePath(); 395 return path; 396 } 397 398 private Path2D decodePath12() { 399 path.reset(); 400 path.moveTo(decodeX(0.0f), decodeY(0.71428573f)); 401 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeAnchorX(0.5555555820465088f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(0.5555556f), decodeY(0.0f)); 402 path.curveTo(decodeAnchorX(0.5555555820465088f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(2.444444417953491f, -3.0f), decodeAnchorY(0.0f, 0.0f), decodeX(2.4444444f), decodeY(0.0f)); 403 path.curveTo(decodeAnchorX(2.444444417953491f, 3.0f), decodeAnchorY(0.0f, 0.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, -3.0f), decodeX(3.0f), decodeY(0.71428573f)); 404 path.curveTo(decodeAnchorX(3.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeAnchorX(3.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeX(3.0f), decodeY(3.0f)); 405 path.lineTo(decodeX(0.0f), decodeY(3.0f)); 406 path.curveTo(decodeAnchorX(0.0f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeAnchorX(0.0f, 0.0f), decodeAnchorY(0.7142857313156128f, 3.0f), decodeX(0.0f), decodeY(0.71428573f)); 407 path.closePath(); 408 return path; 409 } 410 411 private Path2D decodePath13() { 412 path.reset(); 413 path.moveTo(decodeX(0.11111111f), decodeY(3.0f)); 414 path.curveTo(decodeAnchorX(0.1111111119389534f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeAnchorX(0.1111111119389534f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.5555555555555536f), decodeX(0.11111111f), decodeY(0.85714287f)); 415 path.curveTo(decodeAnchorX(0.1111111119389534f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.5555555555555536f), decodeAnchorX(0.6666666865348816f, -3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(0.6666667f), decodeY(0.14285715f)); 416 path.curveTo(decodeAnchorX(0.6666666865348816f, 3.444444444444443f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.3333332538604736f, -3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeX(2.3333333f), decodeY(0.14285715f)); 417 path.curveTo(decodeAnchorX(2.3333332538604736f, 3.333333333333343f), decodeAnchorY(0.1428571492433548f, 0.0f), decodeAnchorX(2.8888888359069824f, 0.0f), decodeAnchorY(0.8571428656578064f, -3.277777777777777f), decodeX(2.8888888f), decodeY(0.85714287f)); 418 path.curveTo(decodeAnchorX(2.8888888359069824f, 0.0f), decodeAnchorY(0.8571428656578064f, 3.277777777777777f), decodeAnchorX(2.8888888359069824f, 0.0f), decodeAnchorY(3.0f, 0.0f), decodeX(2.8888888f), decodeY(3.0f)); 419 path.lineTo(decodeX(0.11111111f), decodeY(3.0f)); 420 path.closePath(); 421 return path; 422 } 423 424 private Path2D decodePath14() { 425 path.reset(); 426 path.moveTo(decodeX(1.4583333f), decodeY(2.25f)); 427 path.lineTo(decodeX(1.4599359f), decodeY(2.777778f)); 428 path.lineTo(decodeX(0.2962963f), decodeY(2.777778f)); 429 path.lineTo(decodeX(0.29166666f), decodeY(0.88095236f)); 430 path.curveTo(decodeAnchorX(0.2916666567325592f, 0.0f), decodeAnchorY(0.8809523582458496f, -2.2500000000000004f), decodeAnchorX(0.6574074029922485f, -1.9166666666666647f), decodeAnchorY(0.380952388048172f, 0.0f), decodeX(0.6574074f), decodeY(0.3809524f)); 431 path.lineTo(decodeX(2.3009257f), decodeY(0.3809524f)); 432 path.curveTo(decodeAnchorX(2.3009257316589355f, 2.124999999999986f), decodeAnchorY(0.380952388048172f, 0.0f), decodeAnchorX(2.712963104248047f, 0.0f), decodeAnchorY(0.863095223903656f, -2.5833333333333317f), decodeX(2.712963f), decodeY(0.8630952f)); 433 path.lineTo(decodeX(2.7083333f), decodeY(2.7638886f)); 434 path.lineTo(decodeX(1.4615384f), decodeY(2.777778f)); 435 path.lineTo(decodeX(1.4583333f), decodeY(2.2361114f)); 436 path.lineTo(decodeX(2.523148f), decodeY(2.222222f)); 437 path.lineTo(decodeX(2.5138888f), decodeY(0.86904764f)); 438 path.curveTo(decodeAnchorX(2.5138888359069824f, -7.105427357601002E-15f), decodeAnchorY(0.8690476417541504f, -0.9166666666666679f), decodeAnchorX(2.2962963581085205f, 1.0833333333333357f), decodeAnchorY(0.6071428656578064f, -1.7763568394002505E-15f), decodeX(2.2962964f), decodeY(0.60714287f)); 439 path.lineTo(decodeX(0.6481482f), decodeY(0.6130952f)); 440 path.curveTo(decodeAnchorX(0.6481481790542603f, -1.0f), decodeAnchorY(0.613095223903656f, 0.0f), decodeAnchorX(0.4861111044883728f, 0.04166666666666696f), decodeAnchorY(0.8690476417541504f, -0.9583333333333339f), decodeX(0.4861111f), decodeY(0.86904764f)); 441 path.lineTo(decodeX(0.47685182f), decodeY(2.2361114f)); 442 path.lineTo(decodeX(1.4583333f), decodeY(2.25f)); 443 path.closePath(); 444 return path; 445 } 446 447 448 449 private Paint decodeGradient1(Shape s) { 450 Rectangle2D bounds = s.getBounds2D(); 451 float x = (float)bounds.getX(); 452 float y = (float)bounds.getY(); 453 float w = (float)bounds.getWidth(); 454 float h = (float)bounds.getHeight(); 455 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 456 new float[] { 0.0f,0.5f,1.0f }, 457 new Color[] { color1, 458 decodeColor(color1,color2,0.5f), 459 color2}); 460 } 461 462 private Paint decodeGradient2(Shape s) { 463 Rectangle2D bounds = s.getBounds2D(); 464 float x = (float)bounds.getX(); 465 float y = (float)bounds.getY(); 466 float w = (float)bounds.getWidth(); 467 float h = (float)bounds.getHeight(); 468 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 469 new float[] { 0.0f,0.1f,0.2f,0.6f,1.0f }, 470 new Color[] { color3, 471 decodeColor(color3,color4,0.5f), 472 color4, 473 decodeColor(color4,color5,0.5f), 474 color5}); 475 } 476 477 private Paint decodeGradient3(Shape s) { 478 Rectangle2D bounds = s.getBounds2D(); 479 float x = (float)bounds.getX(); 480 float y = (float)bounds.getY(); 481 float w = (float)bounds.getWidth(); 482 float h = (float)bounds.getHeight(); 483 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 484 new float[] { 0.0f,0.5f,1.0f }, 485 new Color[] { color6, 486 decodeColor(color6,color2,0.5f), 487 color2}); 488 } 489 490 private Paint decodeGradient4(Shape s) { 491 Rectangle2D bounds = s.getBounds2D(); 492 float x = (float)bounds.getX(); 493 float y = (float)bounds.getY(); 494 float w = (float)bounds.getWidth(); 495 float h = (float)bounds.getHeight(); 496 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 497 new float[] { 0.0f,0.1f,0.2f,0.6f,1.0f }, 498 new Color[] { color7, 499 decodeColor(color7,color8,0.5f), 500 color8, 501 decodeColor(color8,color9,0.5f), 502 color9}); 503 } 504 505 private Paint decodeGradient5(Shape s) { 506 Rectangle2D bounds = s.getBounds2D(); 507 float x = (float)bounds.getX(); 508 float y = (float)bounds.getY(); 509 float w = (float)bounds.getWidth(); 510 float h = (float)bounds.getHeight(); 511 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 512 new float[] { 0.0f,0.5f,1.0f }, 513 new Color[] { color10, 514 decodeColor(color10,color2,0.5f), 515 color2}); 516 } 517 518 private Paint decodeGradient6(Shape s) { 519 Rectangle2D bounds = s.getBounds2D(); 520 float x = (float)bounds.getX(); 521 float y = (float)bounds.getY(); 522 float w = (float)bounds.getWidth(); 523 float h = (float)bounds.getHeight(); 524 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 525 new float[] { 0.0f,0.1f,0.2f,0.42096776f,0.64193547f,0.82096773f,1.0f }, 526 new Color[] { color11, 527 decodeColor(color11,color12,0.5f), 528 color12, 529 decodeColor(color12,color13,0.5f), 530 color13, 531 decodeColor(color13,color14,0.5f), 532 color14}); 533 } 534 535 private Paint decodeGradient7(Shape s) { 536 Rectangle2D bounds = s.getBounds2D(); 537 float x = (float)bounds.getX(); 538 float y = (float)bounds.getY(); 539 float w = (float)bounds.getWidth(); 540 float h = (float)bounds.getHeight(); 541 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 542 new float[] { 0.0f,0.5f,1.0f }, 543 new Color[] { color15, 544 decodeColor(color15,color16,0.5f), 545 color16}); 546 } 547 548 private Paint decodeGradient8(Shape s) { 549 Rectangle2D bounds = s.getBounds2D(); 550 float x = (float)bounds.getX(); 551 float y = (float)bounds.getY(); 552 float w = (float)bounds.getWidth(); 553 float h = (float)bounds.getHeight(); 554 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 555 new float[] { 0.0f,0.1f,0.2f,0.6f,1.0f }, 556 new Color[] { color17, 557 decodeColor(color17,color18,0.5f), 558 color18, 559 decodeColor(color18,color5,0.5f), 560 color5}); 561 } 562 563 private Paint decodeGradient9(Shape s) { 564 Rectangle2D bounds = s.getBounds2D(); 565 float x = (float)bounds.getX(); 566 float y = (float)bounds.getY(); 567 float w = (float)bounds.getWidth(); 568 float h = (float)bounds.getHeight(); 569 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 570 new float[] { 0.0f,0.12419355f,0.2483871f,0.42580646f,0.6032258f,0.6854839f,0.7677419f,0.88387096f,1.0f }, 571 new Color[] { color19, 572 decodeColor(color19,color20,0.5f), 573 color20, 574 decodeColor(color20,color21,0.5f), 575 color21, 576 decodeColor(color21,color22,0.5f), 577 color22, 578 decodeColor(color22,color23,0.5f), 579 color23}); 580 } 581 582 private Paint decodeGradient10(Shape s) { 583 Rectangle2D bounds = s.getBounds2D(); 584 float x = (float)bounds.getX(); 585 float y = (float)bounds.getY(); 586 float w = (float)bounds.getWidth(); 587 float h = (float)bounds.getHeight(); 588 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 589 new float[] { 0.0f,0.5f,1.0f }, 590 new Color[] { color24, 591 decodeColor(color24,color2,0.5f), 592 color2}); 593 } 594 595 private Paint decodeGradient11(Shape s) { 596 Rectangle2D bounds = s.getBounds2D(); 597 float x = (float)bounds.getX(); 598 float y = (float)bounds.getY(); 599 float w = (float)bounds.getWidth(); 600 float h = (float)bounds.getHeight(); 601 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 602 new float[] { 0.0f,0.5f,1.0f }, 603 new Color[] { color25, 604 decodeColor(color25,color2,0.5f), 605 color2}); 606 } 607 608 private Paint decodeGradient12(Shape s) { 609 Rectangle2D bounds = s.getBounds2D(); 610 float x = (float)bounds.getX(); 611 float y = (float)bounds.getY(); 612 float w = (float)bounds.getWidth(); 613 float h = (float)bounds.getHeight(); 614 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 615 new float[] { 0.0f,0.12419355f,0.2483871f,0.42580646f,0.6032258f,0.6854839f,0.7677419f,0.86774194f,0.9677419f }, 616 new Color[] { color26, 617 decodeColor(color26,color27,0.5f), 618 color27, 619 decodeColor(color27,color28,0.5f), 620 color28, 621 decodeColor(color28,color29,0.5f), 622 color29, 623 decodeColor(color29,color30,0.5f), 624 color30}); 625 } 626 627 private Paint decodeGradient13(Shape s) { 628 Rectangle2D bounds = s.getBounds2D(); 629 float x = (float)bounds.getX(); 630 float y = (float)bounds.getY(); 631 float w = (float)bounds.getWidth(); 632 float h = (float)bounds.getHeight(); 633 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 634 new float[] { 0.0f,0.5f,1.0f }, 635 new Color[] { color25, 636 decodeColor(color25,color31,0.5f), 637 color31}); 638 } 639 640 private Paint decodeGradient14(Shape s) { 641 Rectangle2D bounds = s.getBounds2D(); 642 float x = (float)bounds.getX(); 643 float y = (float)bounds.getY(); 644 float w = (float)bounds.getWidth(); 645 float h = (float)bounds.getHeight(); 646 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 647 new float[] { 0.0f,0.12419355f,0.2483871f,0.42580646f,0.6032258f,0.6854839f,0.7677419f,0.8548387f,0.9419355f }, 648 new Color[] { color32, 649 decodeColor(color32,color33,0.5f), 650 color33, 651 decodeColor(color33,color34,0.5f), 652 color34, 653 decodeColor(color34,color35,0.5f), 654 color35, 655 decodeColor(color35,color36,0.5f), 656 color36}); 657 } 658 659 660 } 661 | Popular Tags |