-
Notifications
You must be signed in to change notification settings - Fork 5
/
WCGraphicsPrismContext.java
1425 lines (1424 loc) · 71.8 KB
/
WCGraphicsPrismContext.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* */ package com.sun.webpane.sg.prism;
/* */
/* */ import com.sun.javafx.font.FontStrike;
/* */ import com.sun.javafx.font.PGFont;
/* */ import com.sun.javafx.geom.Arc2D;
/* */ import com.sun.javafx.geom.Path2D;
/* */ import com.sun.javafx.geom.RectBounds;
/* */ import com.sun.javafx.geom.Rectangle;
/* */ import com.sun.javafx.geom.Shape;
/* */ import com.sun.javafx.geom.transform.Affine2D;
/* */ import com.sun.javafx.geom.transform.Affine3D;
/* */ import com.sun.javafx.geom.transform.BaseTransform;
/* */ import com.sun.javafx.sg.PGImageView;
/* */ import com.sun.javafx.sg.PGNode;
/* */ import com.sun.javafx.sg.PGPath;
/* */ import com.sun.javafx.sg.PGRectangle;
/* */ import com.sun.javafx.sg.PGShape.Mode;
/* */ import com.sun.javafx.sg.PGText;
/* */ import com.sun.javafx.sg.PGTextHelper;
/* */ import com.sun.javafx.sg.prism.NGNode;
/* */ import com.sun.javafx.sg.prism.NGShape;
/* */ import com.sun.javafx.tk.Toolkit;
/* */ import com.sun.prism.BasicStroke;
/* */ import com.sun.prism.CompositeMode;
/* */ import com.sun.prism.Graphics;
/* */ import com.sun.prism.Image;
/* */ import com.sun.prism.RTTexture;
/* */ import com.sun.prism.ReadbackGraphics;
/* */ import com.sun.prism.RenderTarget;
/* */ import com.sun.prism.ResourceFactory;
/* */ import com.sun.prism.Texture;
/* */ import com.sun.prism.paint.Color;
/* */ import com.sun.prism.paint.Gradient;
/* */ import com.sun.prism.paint.ImagePattern;
/* */ import com.sun.prism.paint.Paint;
/* */ import com.sun.scenario.effect.Blend;
/* */ import com.sun.scenario.effect.Blend.Mode;
/* */ import com.sun.scenario.effect.Color4f;
/* */ import com.sun.scenario.effect.DropShadow;
/* */ import com.sun.scenario.effect.Effect;
/* */ import com.sun.scenario.effect.Effect.AccelType;
/* */ import com.sun.scenario.effect.FilterContext;
/* */ import com.sun.scenario.effect.ImageData;
/* */ import com.sun.scenario.effect.impl.prism.PrDrawable;
/* */ import com.sun.scenario.effect.impl.prism.PrEffectHelper;
/* */ import com.sun.scenario.effect.impl.prism.PrFilterContext;
/* */ import com.sun.webpane.platform.graphics.Ref;
/* */ import com.sun.webpane.platform.graphics.RenderTheme;
/* */ import com.sun.webpane.platform.graphics.ScrollBarTheme;
/* */ import com.sun.webpane.platform.graphics.WCFont;
/* */ import com.sun.webpane.platform.graphics.WCGradient;
/* */ import com.sun.webpane.platform.graphics.WCGraphicsContext;
/* */ import com.sun.webpane.platform.graphics.WCIcon;
/* */ import com.sun.webpane.platform.graphics.WCImage;
/* */ import com.sun.webpane.platform.graphics.WCPath;
/* */ import com.sun.webpane.platform.graphics.WCPoint;
/* */ import com.sun.webpane.platform.graphics.WCRectangle;
/* */ import com.sun.webpane.platform.graphics.WCTransform;
/* */ import java.nio.ByteBuffer;
/* */ import java.nio.ByteOrder;
/* */ import java.util.Stack;
/* */ import java.util.logging.Level;
/* */ import java.util.logging.Logger;
/* */
/* */ public class WCGraphicsPrismContext extends WCGraphicsContext
/* */ {
/* 49 */ private static final Logger log = Logger.getLogger(WCGraphicsPrismContext.class.getName());
/* */ private Graphics baseGraphics;
/* 54 */ private Stack<ContextState> states = new Stack();
/* */
/* 56 */ private ContextState state = new ContextState();
/* */ private boolean isInitialized;
/* 61 */ private Graphics cachedGraphics = null;
/* */ private int fontSmoothingType;
/* 845 */ private static final BasicStroke focusRingStroke = new BasicStroke(1.1F, 0, 1, 0.0F, new float[] { 1.0F }, 0.0F);
/* */
/* */ public WCGraphicsPrismContext(Graphics paramGraphics)
/* */ {
/* 66 */ init(paramGraphics, true);
/* */ }
/* */
/* */ protected WCGraphicsPrismContext() {
/* */ }
/* */
/* */ protected final void init(Graphics paramGraphics, boolean paramBoolean) {
/* 73 */ if (this.isInitialized) {
/* 74 */ return;
/* */ }
/* 76 */ if ((paramGraphics != null) && (paramBoolean)) {
/* 77 */ this.state.setClip(paramGraphics.getClipRect());
/* 78 */ this.state.setTransform(new Affine3D(paramGraphics.getTransformNoClone()));
/* 79 */ this.state.setAlpha(paramGraphics.getExtraAlpha());
/* */ }
/* */
/* 83 */ this.baseGraphics = (paramGraphics != null ? paramGraphics.getRenderTarget().createGraphics() : null);
/* 84 */ this.isInitialized = true;
/* */ }
/* */
/* */ protected boolean isInitialized() {
/* 88 */ return this.isInitialized;
/* */ }
/* */
/* */ private void resetCachedGraphics() {
/* 92 */ this.cachedGraphics = null;
/* */ }
/* */
/* */ public Object getPlatformGraphics()
/* */ {
/* 97 */ return getGraphics(false);
/* */ }
/* */
/* */ public Graphics getGraphics(boolean paramBoolean) {
/* 101 */ if (this.cachedGraphics == null) {
/* 102 */ localObject = this.state.getLayerNoClone();
/* 103 */ this.cachedGraphics = (localObject != null ? ((Layer)localObject).getGraphics() : this.baseGraphics);
/* */
/* 107 */ this.state.apply(this.cachedGraphics);
/* */
/* 109 */ if (log.isLoggable(Level.FINE)) {
/* 110 */ log.fine("getPlatformGraphics for " + this + " : " + this.cachedGraphics);
/* */ }
/* */
/* */ }
/* */
/* 115 */ Object localObject = this.cachedGraphics.getClipRectNoClone();
/* 116 */ return (paramBoolean) && (localObject != null) && (((Rectangle)localObject).isEmpty()) ? null : this.cachedGraphics;
/* */ }
/* */
/* */ public void saveState()
/* */ {
/* 123 */ this.state.markAsRestorePoint();
/* 124 */ saveStateInternal();
/* */ }
/* */
/* */ private void saveStateInternal()
/* */ {
/* 129 */ this.states.push(this.state);
/* 130 */ this.state = this.state.clone();
/* */ }
/* */
/* */ private void startNewLayer(Layer paramLayer) {
/* 134 */ saveStateInternal();
/* */
/* 137 */ Rectangle localRectangle = this.state.getClipNoClone();
/* */
/* 141 */ Affine3D localAffine3D = new Affine3D(BaseTransform.getTranslateInstance(-localRectangle.x, -localRectangle.y));
/* */
/* 144 */ localAffine3D.concatenate(this.state.getTransformNoClone());
/* */
/* 147 */ localRectangle.x = 0;
/* 148 */ localRectangle.y = 0;
/* */
/* 151 */ Graphics localGraphics = getGraphics(true);
/* 152 */ if ((localGraphics != null) && (localGraphics != this.baseGraphics)) {
/* 153 */ paramLayer.init(localGraphics);
/* */ }
/* */
/* 156 */ this.state.setTransform(localAffine3D);
/* 157 */ this.state.setLayer(paramLayer);
/* */
/* 159 */ resetCachedGraphics();
/* */ }
/* */
/* */ private void renderLayer(Layer paramLayer) {
/* 163 */ WCTransform localWCTransform = getTransform();
/* */
/* 166 */ setTransform(new WCTransform(1.0D, 0.0D, 0.0D, 1.0D, paramLayer.getX(), paramLayer.getY()));
/* */
/* 172 */ Graphics localGraphics = getGraphics(true);
/* 173 */ if (localGraphics != null) {
/* 174 */ paramLayer.render(localGraphics);
/* */ }
/* */
/* 177 */ paramLayer.dispose();
/* */
/* 179 */ setTransform(localWCTransform);
/* */ }
/* */
/* */ private void restoreStateInternal() {
/* 183 */ if (this.states.isEmpty()) {
/* 184 */ if (!$assertionsDisabled) throw new AssertionError("Unbalanced restoreState");
/* 185 */ return;
/* */ }
/* */
/* 188 */ Layer localLayer = this.state.getLayerNoClone();
/* 189 */ this.state = ((ContextState)this.states.pop());
/* 190 */ if (localLayer != this.state.getLayerNoClone()) {
/* 191 */ renderLayer(localLayer);
/* 192 */ if (log.isLoggable(Level.FINE))
/* 193 */ log.fine("Popped layer " + localLayer);
/* */ }
/* */ else {
/* 196 */ resetCachedGraphics();
/* */ }
/* */ }
/* */
/* */ public void restoreState()
/* */ {
/* 202 */ log.fine("restoring state");
/* */ do
/* 204 */ restoreStateInternal();
/* 205 */ while (!this.state.isRestorePoint());
/* */ }
/* */
/* */ public void setClip(WCPath paramWCPath, boolean paramBoolean) {
/* 209 */ Affine3D localAffine3D = new Affine3D(this.state.getTransformNoClone());
/* 210 */ paramWCPath.transform(localAffine3D.getMxx(), localAffine3D.getMyx(), localAffine3D.getMxy(), localAffine3D.getMyy(), localAffine3D.getMxt(), localAffine3D.getMyt());
/* */
/* 216 */ if (!paramBoolean) {
/* 217 */ localObject = paramWCPath.getBounds();
/* 218 */ this.state.clip(new Rectangle(((WCRectangle)localObject).getIntX(), ((WCRectangle)localObject).getIntY(), ((WCRectangle)localObject).getIntWidth(), ((WCRectangle)localObject).getIntHeight()));
/* */ }
/* */
/* 225 */ Object localObject = this.state.getClipNoClone();
/* */
/* 227 */ if (paramBoolean) {
/* 228 */ paramWCPath.addRect(((Rectangle)localObject).x, ((Rectangle)localObject).y, ((Rectangle)localObject).width, ((Rectangle)localObject).height);
/* */ }
/* */
/* 232 */ paramWCPath.translate(-((Rectangle)localObject).x, -((Rectangle)localObject).y);
/* */
/* 234 */ ClipLayer localClipLayer = new ClipLayer(getGraphics(false), (Rectangle)localObject, paramWCPath);
/* */
/* 237 */ startNewLayer(localClipLayer);
/* */
/* 239 */ if (log.isLoggable(Level.FINE)) {
/* 240 */ log.fine("setClip(WCPath " + paramWCPath.getID() + ")");
/* 241 */ log.fine("Pushed layer " + localClipLayer);
/* */ }
/* */ }
/* */
/* */ public Rectangle transformClip(Rectangle paramRectangle)
/* */ {
/* 247 */ if (paramRectangle == null) {
/* 248 */ return null;
/* */ }
/* */
/* 251 */ float[] arrayOfFloat = { paramRectangle.x, paramRectangle.y, paramRectangle.x + paramRectangle.width, paramRectangle.y, paramRectangle.x, paramRectangle.y + paramRectangle.height, paramRectangle.x + paramRectangle.width, paramRectangle.y + paramRectangle.height };
/* */
/* 256 */ this.state.getTransformNoClone().transform(arrayOfFloat, 0, arrayOfFloat, 0, 4);
/* 257 */ float f1 = Math.min(arrayOfFloat[0], Math.min(arrayOfFloat[2], Math.min(arrayOfFloat[4], arrayOfFloat[6])));
/* */
/* 261 */ float f2 = Math.max(arrayOfFloat[0], Math.max(arrayOfFloat[2], Math.max(arrayOfFloat[4], arrayOfFloat[6])));
/* */
/* 265 */ float f3 = Math.min(arrayOfFloat[1], Math.min(arrayOfFloat[3], Math.min(arrayOfFloat[5], arrayOfFloat[7])));
/* */
/* 269 */ float f4 = Math.max(arrayOfFloat[1], Math.max(arrayOfFloat[3], Math.max(arrayOfFloat[5], arrayOfFloat[7])));
/* */
/* 273 */ return new Rectangle(new RectBounds(f1, f3, f2, f4));
/* */ }
/* */
/* */ public void setClip(Rectangle paramRectangle)
/* */ {
/* 289 */ Affine3D localAffine3D = this.state.getTransformNoClone();
/* */ Object localObject;
/* 290 */ if ((localAffine3D.getMxy() == 0.0D) && (localAffine3D.getMxz() == 0.0D) && (localAffine3D.getMyx() == 0.0D) && (localAffine3D.getMyz() == 0.0D) && (localAffine3D.getMzx() == 0.0D) && (localAffine3D.getMzy() == 0.0D))
/* */ {
/* 295 */ this.state.clip(transformClip(paramRectangle));
/* 296 */ if (log.isLoggable(Level.FINE)) {
/* 297 */ log.log(Level.FINE, "setClip({0})", paramRectangle);
/* */
/* 299 */ localObject = this.state.getClipNoClone();
/* 300 */ if ((localObject != null) && (((Rectangle)localObject).width >= 2) && (((Rectangle)localObject).height >= 2)) {
/* 301 */ WCTransform localWCTransform = getTransform();
/* */
/* 303 */ setTransform(new WCTransform(1.0D, 0.0D, 0.0D, 1.0D, 0.0D, 0.0D));
/* */
/* 308 */ Graphics localGraphics = getGraphics(true);
/* 309 */ if (localGraphics != null) {
/* 310 */ float f = (float)Math.random();
/* 311 */ localGraphics.setPaint(new Color(f, 1.0F - f, 0.5F, 0.1F));
/* */
/* 316 */ localGraphics.setStroke(new BasicStroke());
/* 317 */ localGraphics.fillRect(((Rectangle)localObject).x, ((Rectangle)localObject).y, ((Rectangle)localObject).width, ((Rectangle)localObject).height);
/* */
/* 319 */ localGraphics.setPaint(new Color(1.0F - f, f, 0.5F, 1.0F));
/* */
/* 324 */ localGraphics.drawRect(((Rectangle)localObject).x, ((Rectangle)localObject).y, ((Rectangle)localObject).width, ((Rectangle)localObject).height);
/* */ }
/* */
/* 327 */ setTransform(localWCTransform);
/* 328 */ this.state.clip(new Rectangle(((Rectangle)localObject).x + 1, ((Rectangle)localObject).y + 1, ((Rectangle)localObject).width - 2, ((Rectangle)localObject).height - 2));
/* */ }
/* */ }
/* 331 */ if (this.cachedGraphics != null)
/* 332 */ this.cachedGraphics.setClipRect(this.state.getClipNoClone());
/* */ }
/* */ else
/* */ {
/* 336 */ localObject = new WCPathImpl();
/* 337 */ ((WCPath)localObject).addRect(paramRectangle.x, paramRectangle.y, paramRectangle.width, paramRectangle.height);
/* 338 */ setClip((WCPath)localObject, false);
/* */ }
/* */ }
/* */
/* */ public void setClip(int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
/* 343 */ setClip(new Rectangle(paramInt1, paramInt2, paramInt3, paramInt4));
/* */ }
/* */
/* */ public void setClip(WCRectangle paramWCRectangle) {
/* 347 */ setClip(new Rectangle((int)paramWCRectangle.getX(), (int)paramWCRectangle.getY(), (int)paramWCRectangle.getWidth(), (int)paramWCRectangle.getHeight()));
/* */ }
/* */
/* */ public WCRectangle getClip()
/* */ {
/* 352 */ Rectangle localRectangle = this.state.getClipNoClone();
/* 353 */ return localRectangle == null ? null : new WCRectangle(localRectangle.x, localRectangle.y, localRectangle.width, localRectangle.height);
/* */ }
/* */
/* */ public void translate(float paramFloat1, float paramFloat2) {
/* 357 */ if (log.isLoggable(Level.FINE)) {
/* 358 */ log.log(Level.FINE, "translate({0},{1})", new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2) });
/* */ }
/* 360 */ this.state.translate(paramFloat1, paramFloat2);
/* 361 */ if (this.cachedGraphics != null)
/* 362 */ this.cachedGraphics.translate(paramFloat1, paramFloat2);
/* */ }
/* */
/* */ public void scale(float paramFloat1, float paramFloat2)
/* */ {
/* 367 */ if (log.isLoggable(Level.FINE)) {
/* 368 */ log.fine("scale(" + paramFloat1 + " " + paramFloat2 + ")");
/* */ }
/* 370 */ this.state.scale(paramFloat1, paramFloat2);
/* 371 */ if (this.cachedGraphics != null)
/* 372 */ this.cachedGraphics.scale(paramFloat1, paramFloat2);
/* */ }
/* */
/* */ public void rotate(float paramFloat)
/* */ {
/* 377 */ if (log.isLoggable(Level.FINE)) {
/* 378 */ log.fine("rotate(" + paramFloat + ")");
/* */ }
/* 380 */ this.state.rotate(paramFloat);
/* 381 */ if (this.cachedGraphics != null)
/* 382 */ this.cachedGraphics.setTransform(this.state.getTransformNoClone());
/* */ }
/* */
/* */ public void fillRect(final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4, final Integer paramInteger)
/* */ {
/* 388 */ if (log.isLoggable(Level.FINE)) {
/* 389 */ String str = paramInteger != null ? "fillRect(%f, %f, %f, %f, 0x%x)" : "fillRect(%f, %f, %f, %f, null)";
/* */
/* 392 */ log.fine(String.format(str, new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2), Float.valueOf(paramFloat3), Float.valueOf(paramFloat4), paramInteger }));
/* */ }
/* */
/* 395 */ new Composite(paramInteger, paramFloat1) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 397 */ Paint localPaint = paramInteger != null ? WCGraphicsPrismContext.createColor(paramInteger.intValue()) : WCGraphicsPrismContext.this.state.getPaintNoClone();
/* 398 */ DropShadow localDropShadow = WCGraphicsPrismContext.this.state.getShadowNoClone();
/* 399 */ if (localDropShadow != null) {
/* 400 */ PGRectangle localPGRectangle = Toolkit.getToolkit().createPGRectangle();
/* 401 */ localPGRectangle.updateRectangle(paramFloat1, paramFloat2, paramFloat3, paramFloat4, 0.0F, 0.0F);
/* 402 */ WCGraphicsPrismContext.this.render(paramAnonymousGraphics, localDropShadow, localPaint, null, localPGRectangle);
/* */ } else {
/* 404 */ paramAnonymousGraphics.setPaint(localPaint);
/* 405 */ paramAnonymousGraphics.fillRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4);
/* */ }
/* */ }
/* */ }
/* 395 */ .paint();
/* */ }
/* */
/* */ public void fillRoundedRect(final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4, final float paramFloat5, final float paramFloat6, final float paramFloat7, final float paramFloat8, final float paramFloat9, final float paramFloat10, final float paramFloat11, final float paramFloat12, final int paramInt)
/* */ {
/* 415 */ if (log.isLoggable(Level.FINE)) {
/* 416 */ log.fine(String.format("fillRoundedRect(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, 0x%x)", new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2), Float.valueOf(paramFloat3), Float.valueOf(paramFloat4), Float.valueOf(paramFloat5), Float.valueOf(paramFloat6), Float.valueOf(paramFloat7), Float.valueOf(paramFloat8), Float.valueOf(paramFloat9), Float.valueOf(paramFloat10), Float.valueOf(paramFloat11), Float.valueOf(paramFloat12), Integer.valueOf(paramInt) }));
/* */ }
/* */
/* 422 */ new Composite(paramFloat5, paramFloat7)
/* */ {
/* */ void doPaint(Graphics paramAnonymousGraphics)
/* */ {
/* 427 */ float f1 = (paramFloat5 + paramFloat7 + paramFloat9 + paramFloat11) / 2.0F;
/* 428 */ float f2 = (paramFloat6 + paramFloat8 + paramFloat10 + paramFloat12) / 2.0F;
/* */
/* 430 */ Color localColor = WCGraphicsPrismContext.createColor(paramInt);
/* 431 */ DropShadow localDropShadow = WCGraphicsPrismContext.this.state.getShadowNoClone();
/* 432 */ if (localDropShadow != null) {
/* 433 */ PGRectangle localPGRectangle = Toolkit.getToolkit().createPGRectangle();
/* 434 */ localPGRectangle.updateRectangle(paramFloat1, paramFloat2, paramFloat3, paramFloat4, f1, f2);
/* 435 */ WCGraphicsPrismContext.this.render(paramAnonymousGraphics, localDropShadow, localColor, null, localPGRectangle);
/* */ } else {
/* 437 */ paramAnonymousGraphics.setPaint(localColor);
/* 438 */ paramAnonymousGraphics.fillRoundRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4, f1, f2);
/* */ }
/* */ }
/* */ }
/* 422 */ .paint();
/* */ }
/* */
/* */ public void clearRect(final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4)
/* */ {
/* 446 */ if (log.isLoggable(Level.FINE)) {
/* 447 */ log.fine(String.format("clearRect(%f, %f, %f, %f)", new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2), Float.valueOf(paramFloat3), Float.valueOf(paramFloat4) }));
/* */ }
/* */
/* 450 */ new Composite(paramFloat1, paramFloat2) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 452 */ paramAnonymousGraphics.clearQuad(paramFloat1, paramFloat2, paramFloat1 + paramFloat3, paramFloat2 + paramFloat4);
/* */ }
/* */ }
/* 450 */ .paint();
/* */ }
/* */
/* */ public void setFillColor(int paramInt)
/* */ {
/* 459 */ if (log.isLoggable(Level.FINE)) {
/* 460 */ log.log(Level.FINE, String.format("setFillColor(0x%x)", new Object[] { Integer.valueOf(paramInt) }));
/* */ }
/* 462 */ this.state.setPaint(createColor(paramInt));
/* */ }
/* */
/* */ public void setFillGradient(WCGradient paramWCGradient)
/* */ {
/* 467 */ if (log.isLoggable(Level.FINE)) {
/* 468 */ log.fine("setFillGradient(" + paramWCGradient + ")");
/* */ }
/* 470 */ this.state.setPaint((Gradient)paramWCGradient.getPlatformGradient());
/* */ }
/* */
/* */ public void setTextMode(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3)
/* */ {
/* 475 */ if (log.isLoggable(Level.FINE)) {
/* 476 */ log.fine("setTextMode(fill:" + paramBoolean1 + ",stroke:" + paramBoolean2 + ",clip:" + paramBoolean3 + ")");
/* */ }
/* 478 */ this.state.setTextMode(paramBoolean1, paramBoolean2, paramBoolean3);
/* */ }
/* */
/* */ public void setFontSmoothingType(int paramInt)
/* */ {
/* 483 */ this.fontSmoothingType = paramInt;
/* */ }
/* */
/* */ public void setStrokeStyle(int paramInt)
/* */ {
/* 488 */ if (log.isLoggable(Level.FINE)) {
/* 489 */ log.log(Level.FINE, "setStrokeStyle({0})", Integer.valueOf(paramInt));
/* */ }
/* 491 */ this.state.getStrokeNoClone().setStyle(paramInt);
/* */ }
/* */
/* */ public void setStrokeColor(int paramInt)
/* */ {
/* 496 */ if (log.isLoggable(Level.FINE)) {
/* 497 */ log.log(Level.FINE, String.format("setStrokeColor(0x%x)", new Object[] { Integer.valueOf(paramInt) }));
/* */ }
/* 499 */ this.state.getStrokeNoClone().setPaint(createColor(paramInt));
/* */ }
/* */
/* */ public void setStrokeWidth(float paramFloat)
/* */ {
/* 504 */ if (log.isLoggable(Level.FINE)) {
/* 505 */ log.log(Level.FINE, "setStrokeWidth({0})", new Object[] { Float.valueOf(paramFloat) });
/* */ }
/* 507 */ this.state.getStrokeNoClone().setThickness(paramFloat);
/* */ }
/* */
/* */ public void setStrokeGradient(WCGradient paramWCGradient)
/* */ {
/* 512 */ if (log.isLoggable(Level.FINE)) {
/* 513 */ log.fine("setStrokeGradient(" + paramWCGradient + ")");
/* */ }
/* 515 */ this.state.getStrokeNoClone().setPaint((Gradient)paramWCGradient.getPlatformGradient());
/* */ }
/* */
/* */ public void setLineDash(float paramFloat, float[] paramArrayOfFloat)
/* */ {
/* 520 */ if (log.isLoggable(Level.FINE)) {
/* 521 */ log.fine("setLineDash(" + paramFloat + ":" + paramArrayOfFloat + ")");
/* */ }
/* 523 */ this.state.getStrokeNoClone().setDashOffset(paramFloat);
/* 524 */ this.state.getStrokeNoClone().setDashSizes(paramArrayOfFloat);
/* */ }
/* */
/* */ public void setLineCap(int paramInt)
/* */ {
/* 529 */ if (log.isLoggable(Level.FINE)) {
/* 530 */ log.fine("setLineCap(" + paramInt + ")");
/* */ }
/* 532 */ this.state.getStrokeNoClone().setLineCap(paramInt);
/* */ }
/* */
/* */ public void setLineJoin(int paramInt)
/* */ {
/* 537 */ if (log.isLoggable(Level.FINE)) {
/* 538 */ log.fine("setLineJoin(" + paramInt + ")");
/* */ }
/* 540 */ this.state.getStrokeNoClone().setLineJoin(paramInt);
/* */ }
/* */
/* */ public void setMiterLimit(float paramFloat)
/* */ {
/* 545 */ if (log.isLoggable(Level.FINE)) {
/* 546 */ log.fine("setMiterLimit(" + paramFloat + ")");
/* */ }
/* 548 */ this.state.getStrokeNoClone().setMiterLimit(paramFloat);
/* */ }
/* */
/* */ public void setShadow(float paramFloat1, float paramFloat2, float paramFloat3, int paramInt)
/* */ {
/* 553 */ if (log.isLoggable(Level.FINE)) {
/* 554 */ String str = "setShadow(%f, %f, %f, 0x%x)";
/* 555 */ log.fine(String.format(str, new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2), Float.valueOf(paramFloat3), Integer.valueOf(paramInt) }));
/* */ }
/* 557 */ this.state.setShadow(createShadow(paramFloat1, paramFloat2, paramFloat3, paramInt)); }
/* */ public void drawPolygon(final float[] paramArrayOfFloat, boolean paramBoolean) { // Byte code:
/* */ // 0: getstatic 29 com/sun/webpane/sg/prism/WCGraphicsPrismContext:log Ljava/util/logging/Logger;
/* */ // 3: getstatic 30 java/util/logging/Level:FINE Ljava/util/logging/Level;
/* */ // 6: invokevirtual 31 java/util/logging/Logger:isLoggable (Ljava/util/logging/Level;)Z
/* */ // 9: ifeq +95 -> 104
/* */ // 12: ldc 199
/* */ // 14: astore_3
/* */ // 15: iconst_0
/* */ // 16: istore 4
/* */ // 18: iload 4
/* */ // 20: aload_1
/* */ // 21: arraylength
/* */ // 22: if_icmpge +36 -> 58
/* */ // 25: new 32 java/lang/StringBuilder
/* */ // 28: dup
/* */ // 29: invokespecial 33 java/lang/StringBuilder:<init> ()V
/* */ // 32: aload_3
/* */ // 33: invokevirtual 35 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 36: aload_1
/* */ // 37: iload 4
/* */ // 39: faload
/* */ // 40: invokevirtual 144 java/lang/StringBuilder:append (F)Ljava/lang/StringBuilder;
/* */ // 43: ldc 200
/* */ // 45: invokevirtual 35 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 48: invokevirtual 38 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 51: astore_3
/* */ // 52: iinc 4 1
/* */ // 55: goto -37 -> 18
/* */ // 58: new 32 java/lang/StringBuilder
/* */ // 61: dup
/* */ // 62: invokespecial 33 java/lang/StringBuilder:<init> ()V
/* */ // 65: aload_3
/* */ // 66: invokevirtual 35 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 69: ldc 201
/* */ // 71: invokevirtual 35 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
/* */ // 74: invokevirtual 38 java/lang/StringBuilder:toString ()Ljava/lang/String;
/* */ // 77: astore_3
/* */ // 78: getstatic 29 com/sun/webpane/sg/prism/WCGraphicsPrismContext:log Ljava/util/logging/Logger;
/* */ // 81: getstatic 30 java/util/logging/Level:FINE Ljava/util/logging/Level;
/* */ // 84: ldc 202
/* */ // 86: iconst_2
/* */ // 87: anewarray 138 java/lang/Object
/* */ // 90: dup
/* */ // 91: iconst_0
/* */ // 92: aload_3
/* */ // 93: aastore
/* */ // 94: dup
/* */ // 95: iconst_1
/* */ // 96: iload_2
/* */ // 97: invokestatic 203 java/lang/Boolean:valueOf (Z)Ljava/lang/Boolean;
/* */ // 100: aastore
/* */ // 101: invokevirtual 140 java/util/logging/Logger:log (Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V
/* */ // 104: new 204 com/sun/webpane/sg/prism/WCGraphicsPrismContext$4
/* */ // 107: dup
/* */ // 108: aload_0
/* */ // 109: aload_1
/* */ // 110: invokespecial 205 com/sun/webpane/sg/prism/WCGraphicsPrismContext$4:<init> (Lcom/sun/webpane/sg/prism/WCGraphicsPrismContext;[F)V
/* */ // 113: invokevirtual 206 com/sun/webpane/sg/prism/WCGraphicsPrismContext$4:paint ()V
/* */ // 116: return }
/* 596 */ public void drawLine(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4) { if (log.isLoggable(Level.FINE)) {
/* 597 */ log.log(Level.FINE, "drawLine({0}, {1}, {2}, {3})", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramInt3), Integer.valueOf(paramInt4) });
/* */ }
/* */
/* 601 */ new Composite(paramInt1, paramInt2) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 603 */ if (WCGraphicsPrismContext.this.state.getStrokeNoClone().apply(paramAnonymousGraphics))
/* 604 */ paramAnonymousGraphics.drawLine(paramInt1, paramInt2, paramInt3, paramInt4);
/* */ }
/* */ }
/* 601 */ .paint();
/* */ }
/* */
/* */ public void drawPattern(final WCImage paramWCImage, final WCRectangle paramWCRectangle1, final WCTransform paramWCTransform, final WCPoint paramWCPoint, final WCRectangle paramWCRectangle2)
/* */ {
/* 618 */ if (log.isLoggable(Level.FINE)) {
/* 619 */ log.log(Level.FINE, "drawPattern({0}, {1}, {2}, {3})", new Object[] { Integer.valueOf(paramWCRectangle2.getIntX()), Integer.valueOf(paramWCRectangle2.getIntY()), Integer.valueOf(paramWCRectangle2.getIntWidth()), Integer.valueOf(paramWCRectangle2.getIntHeight()) });
/* */ }
/* */
/* 625 */ if (paramWCImage != null)
/* 626 */ new Composite(paramWCPoint, paramWCRectangle1)
/* */ {
/* */ void doPaint(Graphics paramAnonymousGraphics)
/* */ {
/* 630 */ float f1 = paramWCPoint.getX() + paramWCRectangle1.getX() * (float)paramWCTransform.getMatrix()[0];
/* */
/* 632 */ float f2 = paramWCPoint.getY() + paramWCRectangle1.getY() * (float)paramWCTransform.getMatrix()[3];
/* */
/* 634 */ float f3 = paramWCRectangle1.getWidth() * (float)paramWCTransform.getMatrix()[0];
/* */
/* 636 */ float f4 = paramWCRectangle1.getHeight() * (float)paramWCTransform.getMatrix()[3];
/* */
/* 639 */ Image localImage = ((PrismImage)paramWCImage).getImage();
/* */
/* 642 */ if (!paramWCRectangle1.contains(new WCRectangle(0.0F, 0.0F, paramWCImage.getWidth(), paramWCImage.getHeight())))
/* */ {
/* 644 */ localImage = localImage.createSubImage(paramWCRectangle1.getIntX(), paramWCRectangle1.getIntY(), (int)Math.ceil(paramWCRectangle1.getWidth()), (int)Math.ceil(paramWCRectangle1.getHeight()));
/* */ }
/* */
/* 649 */ paramAnonymousGraphics.setPaint(new ImagePattern(localImage, f1, f2, f3, f4, false));
/* */
/* 655 */ paramAnonymousGraphics.fillRect(paramWCRectangle2.getX(), paramWCRectangle2.getY(), paramWCRectangle2.getWidth(), paramWCRectangle2.getHeight());
/* */ }
/* */ }
/* 626 */ .paint();
/* */ }
/* */
/* */ public void drawImage(final WCImage paramWCImage, final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4, final float paramFloat5, final float paramFloat6, final float paramFloat7, final float paramFloat8)
/* */ {
/* 667 */ if (log.isLoggable(Level.FINE)) {
/* 668 */ log.log(Level.FINE, "drawImage(img, dst({0},{1},{2},{3}), src({4},{5},{6},{7}))", new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2), Float.valueOf(paramFloat3), Float.valueOf(paramFloat4), Float.valueOf(paramFloat5), Float.valueOf(paramFloat6), Float.valueOf(paramFloat7), Float.valueOf(paramFloat8) });
/* */ }
/* */
/* 674 */ if ((paramWCImage instanceof PrismImage))
/* 675 */ new Composite(paramWCImage, paramFloat1) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 677 */ PrismImage localPrismImage = (PrismImage)paramWCImage;
/* 678 */ DropShadow localDropShadow = WCGraphicsPrismContext.this.state.getShadowNoClone();
/* 679 */ if (localDropShadow != null) {
/* 680 */ PGImageView localPGImageView = Toolkit.getToolkit().createPGImageView();
/* 681 */ localPGImageView.setImage(localPrismImage.getImage());
/* 682 */ localPGImageView.setX(paramFloat1);
/* 683 */ localPGImageView.setY(paramFloat2);
/* 684 */ localPGImageView.setViewport(paramFloat3, paramFloat4, paramFloat5, paramFloat6, paramFloat7, paramFloat8, false);
/* 685 */ localPGImageView.setContentBounds(new RectBounds(paramFloat1, paramFloat2, paramFloat1 + paramFloat3, paramFloat2 + paramFloat4));
/* 686 */ WCGraphicsPrismContext.this.render(paramAnonymousGraphics, localDropShadow, null, null, localPGImageView);
/* */ } else {
/* 688 */ localPrismImage.draw(paramAnonymousGraphics, (int)paramFloat1, (int)paramFloat2, (int)(paramFloat1 + paramFloat3), (int)(paramFloat2 + paramFloat4), (int)paramFloat5, (int)paramFloat6, (int)(paramFloat5 + paramFloat7), (int)(paramFloat6 + paramFloat8));
/* */ }
/* */ }
/* */ }
/* 675 */ .paint();
/* */ }
/* */
/* */ public void drawBitmapImage(final ByteBuffer paramByteBuffer, final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4)
/* */ {
/* 701 */ new Composite(paramByteBuffer, paramInt3) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 703 */ paramByteBuffer.order(ByteOrder.nativeOrder());
/* 704 */ Image localImage = Image.fromByteBgraPreData(paramByteBuffer, paramInt3, paramInt4);
/* 705 */ Texture localTexture = paramAnonymousGraphics.getResourceFactory().createTexture(localImage);
/* 706 */ paramAnonymousGraphics.drawTexture(localTexture, paramInt1, paramInt2, paramInt1 + paramInt3, paramInt2 + paramInt4, 0.0F, 0.0F, paramInt3, paramInt4);
/* 707 */ localTexture.dispose();
/* */ }
/* */ }
/* 701 */ .paint();
/* */ }
/* */
/* */ public void drawIcon(WCIcon paramWCIcon, int paramInt1, int paramInt2)
/* */ {
/* 714 */ if (log.isLoggable(Level.FINE))
/* 715 */ log.log(Level.FINE, "UNIMPLEMENTED drawIcon ({0}, {1})", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2) });
/* */ }
/* */
/* */ public void drawRect(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4)
/* */ {
/* 721 */ if (log.isLoggable(Level.FINE)) {
/* 722 */ log.log(Level.FINE, "drawRect({0}, {1}, {2}, {3})", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramInt3), Integer.valueOf(paramInt4) });
/* */ }
/* */
/* 726 */ new Composite(paramInt1, paramInt2) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 728 */ Paint localPaint = WCGraphicsPrismContext.this.state.getPaintNoClone();
/* 729 */ if ((localPaint != null) && (localPaint.isOpaque())) {
/* 730 */ paramAnonymousGraphics.setPaint(localPaint);
/* 731 */ paramAnonymousGraphics.fillRect(paramInt1, paramInt2, paramInt3, paramInt4);
/* */ }
/* */
/* 734 */ if (WCGraphicsPrismContext.this.state.getStrokeNoClone().apply(paramAnonymousGraphics))
/* 735 */ paramAnonymousGraphics.drawRect(paramInt1, paramInt2, paramInt3, paramInt4);
/* */ }
/* */ }
/* 726 */ .paint();
/* */ }
/* */
/* */ public void drawString(final WCFont paramWCFont, final int[] paramArrayOfInt, float[] paramArrayOfFloat, final float paramFloat1, final float paramFloat2)
/* */ {
/* 748 */ if (log.isLoggable(Level.FINE)) {
/* 749 */ log.log(Level.FINE, "drawStringAsGlyph({0} {1}, {2})", new Object[] { paramArrayOfInt, Float.valueOf(paramFloat1), Float.valueOf(paramFloat2) });
/* */ }
/* */
/* 752 */ new Composite(paramArrayOfInt, paramWCFont)
/* */ {
/* */ void doPaint(Graphics paramAnonymousGraphics)
/* */ {
/* 757 */ String str = new String(paramArrayOfInt, 0, paramArrayOfInt.length);
/* 758 */ PGFont localPGFont = (PGFont)paramWCFont.getPlatformFont();
/* 759 */ Paint localPaint = WCGraphicsPrismContext.this.state.isTextFill() ? WCGraphicsPrismContext.this.state.getPaintNoClone() : null;
/* */
/* 762 */ BasicStroke localBasicStroke = WCGraphicsPrismContext.this.state.isTextStroke() ? WCGraphicsPrismContext.this.state.getStrokeNoClone().getPlatformStroke() : null;
/* */
/* 765 */ DropShadow localDropShadow = WCGraphicsPrismContext.this.state.getShadowNoClone();
/* */ Object localObject;
/* 766 */ if (localDropShadow != null) {
/* 767 */ localObject = Toolkit.getToolkit().createPGText();
/* 768 */ PGTextHelper localPGTextHelper = ((PGText)localObject).getTextHelper();
/* 769 */ localPGTextHelper.setText(str);
/* 770 */ localPGTextHelper.setFont(localPGFont);
/* 771 */ localPGTextHelper.setLocation(paramFloat1, paramFloat2);
/* 772 */ localPGTextHelper.setFontSmoothingType(WCGraphicsPrismContext.this.fontSmoothingType);
/* 773 */ ((PGText)localObject).updateText();
/* 774 */ WCGraphicsPrismContext.this.render(paramAnonymousGraphics, localDropShadow, localPaint, localBasicStroke, (PGNode)localObject);
/* */ } else {
/* 776 */ localObject = localPGFont.getStrike(paramAnonymousGraphics.getTransformNoClone(), WCGraphicsPrismContext.this.fontSmoothingType);
/* 777 */ if (localPaint != null) {
/* 778 */ paramAnonymousGraphics.setPaint(localPaint);
/* 779 */ paramAnonymousGraphics.drawString(str, (FontStrike)localObject, paramFloat1, paramFloat2);
/* */ }
/* 781 */ if (localBasicStroke != null) {
/* 782 */ localPaint = (Paint)WCGraphicsPrismContext.this.state.getStrokeNoClone().getPaint();
/* 783 */ if (localPaint != null) {
/* 784 */ paramAnonymousGraphics.setPaint(localPaint);
/* 785 */ paramAnonymousGraphics.setStroke(localBasicStroke);
/* 786 */ paramAnonymousGraphics.draw(((FontStrike)localObject).getOutline(str, BaseTransform.getTranslateInstance(paramFloat1, paramFloat2)));
/* */ }
/* */ }
/* */ }
/* */ }
/* */ }
/* 752 */ .paint();
/* */ }
/* */
/* */ public void drawString(WCFont paramWCFont, String paramString, boolean paramBoolean, int paramInt1, int paramInt2, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
/* */ {
/* 803 */ if (log.isLoggable(Level.FINE)) {
/* 804 */ log.log(Level.FINE, "drawString({0}, {1}, {2})", new Object[] { paramString, Float.valueOf(paramFloat3), Float.valueOf(paramFloat4) });
/* */ }
/* */
/* 810 */ int[] arrayOfInt = new int[paramInt2 - paramInt1];
/* 811 */ for (int i = 0; i < paramInt2 - paramInt1; i++) {
/* 812 */ arrayOfInt[i] = paramString.codePointAt(paramBoolean ? paramInt2 - i - 1 : paramInt1 + i);
/* */ }
/* */
/* 816 */ drawString(paramWCFont, arrayOfInt, null, paramFloat3, paramFloat4);
/* */ }
/* */
/* */ public void setComposite(int paramInt)
/* */ {
/* 824 */ log.log(Level.FINE, "setComposite({0})", Integer.valueOf(paramInt));
/* 825 */ this.state.setCompositeOperation(paramInt);
/* */ }
/* */
/* */ public void drawEllipse(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4) {
/* 829 */ if (log.isLoggable(Level.FINE)) {
/* 830 */ log.log(Level.FINE, "drawEllipse({0}, {1}, {2}, {3})", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramInt3), Integer.valueOf(paramInt4) });
/* */ }
/* */
/* 833 */ new Composite(paramInt1, paramInt2) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 835 */ paramAnonymousGraphics.setPaint(WCGraphicsPrismContext.this.state.getPaintNoClone());
/* 836 */ paramAnonymousGraphics.fillEllipse(paramInt1, paramInt2, paramInt3, paramInt4);
/* 837 */ if (WCGraphicsPrismContext.this.state.getStrokeNoClone().apply(paramAnonymousGraphics))
/* 838 */ paramAnonymousGraphics.drawEllipse(paramInt1, paramInt2, paramInt3, paramInt4);
/* */ }
/* */ }
/* 833 */ .paint();
/* */ }
/* */
/* */ public void drawFocusRing(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4, final int paramInt5)
/* */ {
/* 851 */ if (log.isLoggable(Level.FINE)) {
/* 852 */ log.log(Level.FINE, String.format("drawFocusRing: %d, %d, %d, %d, 0x%x", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramInt3), Integer.valueOf(paramInt4), Integer.valueOf(paramInt5) }));
/* */ }
/* */
/* 857 */ new Composite(paramInt5, paramInt1) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 859 */ paramAnonymousGraphics.setPaint(WCGraphicsPrismContext.createColor(paramInt5));
/* 860 */ BasicStroke localBasicStroke = paramAnonymousGraphics.getStroke();
/* 861 */ paramAnonymousGraphics.setStroke(WCGraphicsPrismContext.focusRingStroke);
/* 862 */ paramAnonymousGraphics.drawRoundRect(paramInt1, paramInt2, paramInt3, paramInt4, 4.0F, 4.0F);
/* 863 */ paramAnonymousGraphics.setStroke(localBasicStroke);
/* */ }
/* */ }
/* 857 */ .paint();
/* */ }
/* */
/* */ public void setAlpha(float paramFloat)
/* */ {
/* 869 */ log.log(Level.FINE, "setAlpha({0})", Float.valueOf(paramFloat));
/* */
/* 871 */ this.state.setAlpha(paramFloat);
/* */
/* 873 */ if (null != this.cachedGraphics)
/* 874 */ this.cachedGraphics.setExtraAlpha(this.state.getAlpha());
/* */ }
/* */
/* */ public float getAlpha()
/* */ {
/* 879 */ return this.state.getAlpha();
/* */ }
/* */
/* */ public void beginTransparencyLayer(float paramFloat) {
/* 883 */ TransparencyLayer localTransparencyLayer = new TransparencyLayer(getGraphics(false), this.state.getClipNoClone(), paramFloat);
/* */
/* 886 */ if (log.isLoggable(Level.FINE)) {
/* 887 */ log.fine(String.format("beginTransparencyLayer(%s)", new Object[] { localTransparencyLayer }));
/* */ }
/* */
/* 891 */ this.state.markAsRestorePoint();
/* */
/* 893 */ startNewLayer(localTransparencyLayer);
/* */ }
/* */
/* */ public void endTransparencyLayer() {
/* 897 */ if (log.isLoggable(Level.FINE)) {
/* 898 */ log.fine(String.format("endTransparencyLayer(%s)", new Object[] { this.state.getLayerNoClone() }));
/* */ }
/* */
/* 902 */ restoreState();
/* */ }
/* */
/* */ public void drawWidget(RenderTheme paramRenderTheme, Ref paramRef, int paramInt1, int paramInt2)
/* */ {
/* 907 */ paramRenderTheme.drawWidget(this, paramRef, paramInt1, paramInt2);
/* */ }
/* */
/* */ public void drawScrollbar(ScrollBarTheme paramScrollBarTheme, Ref paramRef, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
/* */ {
/* 914 */ paramScrollBarTheme.paint(this, paramRef, paramInt1, paramInt2, paramInt3, paramInt4);
/* */ }
/* */
/* */ private static Rectangle intersect(Rectangle paramRectangle1, Rectangle paramRectangle2) {
/* 918 */ if (paramRectangle1 == null) {
/* 919 */ return paramRectangle2;
/* */ }
/* 921 */ RectBounds localRectBounds = paramRectangle1.toRectBounds();
/* 922 */ localRectBounds.intersectWith(paramRectangle2);
/* 923 */ paramRectangle1.setBounds(localRectBounds);
/* 924 */ return paramRectangle1;
/* */ }
/* */
/* */ static Color createColor(int paramInt) {
/* 928 */ float f1 = (0xFF & paramInt >> 24) / 255.0F;
/* 929 */ float f2 = (0xFF & paramInt >> 16) / 255.0F;
/* 930 */ float f3 = (0xFF & paramInt >> 8) / 255.0F;
/* 931 */ float f4 = (0xFF & paramInt) / 255.0F;
/* 932 */ return new Color(f2, f3, f4, f1);
/* */ }
/* */
/* */ private static Color4f createColor4f(int paramInt) {
/* 936 */ float f1 = (0xFF & paramInt >> 24) / 255.0F;
/* 937 */ float f2 = (0xFF & paramInt >> 16) / 255.0F;
/* 938 */ float f3 = (0xFF & paramInt >> 8) / 255.0F;
/* 939 */ float f4 = (0xFF & paramInt) / 255.0F;
/* 940 */ return new Color4f(f2, f3, f4, f1);
/* */ }
/* */
/* */ private DropShadow createShadow(float paramFloat1, float paramFloat2, float paramFloat3, int paramInt) {
/* 944 */ if ((paramFloat1 == 0.0F) && (paramFloat2 == 0.0F) && (paramFloat3 == 0.0F)) {
/* 945 */ return null;
/* */ }
/* 947 */ DropShadow localDropShadow = new DropShadow();
/* 948 */ localDropShadow.setOffsetX((int)paramFloat1);
/* 949 */ localDropShadow.setOffsetY((int)paramFloat2);
/* 950 */ localDropShadow.setRadius(paramFloat3 > 127.0F ? 127.0F : paramFloat3 < 0.0F ? 0.0F : paramFloat3);
/* 951 */ localDropShadow.setColor(createColor4f(paramInt));
/* 952 */ return localDropShadow;
/* */ }
/* */
/* */ private void render(Graphics paramGraphics, Effect paramEffect, Paint paramPaint, BasicStroke paramBasicStroke, PGNode paramPGNode) {
/* 956 */ if ((paramPGNode instanceof NGShape)) {
/* 957 */ NGShape localNGShape = (NGShape)paramPGNode;
/* 958 */ Shape localShape = localNGShape.getShape();
/* 959 */ Paint localPaint = (Paint)this.state.getStrokeNoClone().getPaint();
/* 960 */ if ((paramBasicStroke != null) && (localPaint != null)) {
/* 961 */ localShape = paramBasicStroke.createStrokedShape(localShape);
/* 962 */ localNGShape.setDrawStroke(paramBasicStroke);
/* 963 */ localNGShape.setDrawPaint(localPaint);
/* 964 */ localNGShape.setMode(paramPaint == null ? PGShape.Mode.STROKE : PGShape.Mode.STROKE_FILL);
/* */ } else {
/* 966 */ localNGShape.setMode(paramPaint == null ? PGShape.Mode.EMPTY : PGShape.Mode.FILL);
/* */ }
/* 968 */ localNGShape.setFillPaint(paramPaint);
/* 969 */ localNGShape.setContentBounds(localShape.getBounds());
/* */ }
/* 971 */ boolean bool = paramGraphics.hasPreCullingBits();
/* 972 */ paramGraphics.setHasPreCullingBits(false);
/* 973 */ paramPGNode.setEffect(paramEffect);
/* 974 */ ((NGNode)paramPGNode).render(paramGraphics);
/* 975 */ paramGraphics.setHasPreCullingBits(bool);
/* */ }
/* */
/* */ public void strokeArc(final int paramInt1, final int paramInt2, final int paramInt3, final int paramInt4, final int paramInt5, final int paramInt6)
/* */ {
/* 1420 */ if (log.isLoggable(Level.FINE)) {
/* 1421 */ log.fine(String.format("strokeArc(%d, %d, %d, %d, %d, %d)", new Object[] { Integer.valueOf(paramInt1), Integer.valueOf(paramInt2), Integer.valueOf(paramInt3), Integer.valueOf(paramInt4), Integer.valueOf(paramInt5), Integer.valueOf(paramInt6) }));
/* */ }
/* */
/* 1424 */ new Composite(paramInt1, paramInt2) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 1426 */ if (WCGraphicsPrismContext.this.state.getStrokeNoClone().apply(paramAnonymousGraphics))
/* 1427 */ paramAnonymousGraphics.draw(new Arc2D(paramInt1, paramInt2, paramInt3, paramInt4, paramInt5, paramInt6, 0));
/* */ }
/* */ }
/* 1424 */ .paint();
/* */ }
/* */
/* */ public WCImage getImage()
/* */ {
/* 1434 */ return null;
/* */ }
/* */
/* */ public void strokeRect(final float paramFloat1, final float paramFloat2, final float paramFloat3, final float paramFloat4, final float paramFloat5)
/* */ {
/* 1439 */ if (log.isLoggable(Level.FINE)) {
/* 1440 */ log.fine(String.format("strokeRect_FFFFF(%f, %f, %f, %f, %f)", new Object[] { Float.valueOf(paramFloat1), Float.valueOf(paramFloat2), Float.valueOf(paramFloat3), Float.valueOf(paramFloat4), Float.valueOf(paramFloat5) }));
/* */ }
/* */
/* 1444 */ new Composite(paramFloat5, paramFloat1) {
/* */ void doPaint(Graphics paramAnonymousGraphics) {
/* 1446 */ paramAnonymousGraphics.setStroke(new BasicStroke(paramFloat5, 0, 0, Math.max(1.0F, paramFloat5)));
/* */
/* 1451 */ Paint localPaint = (Paint)WCGraphicsPrismContext.this.state.getStrokeNoClone().getPaint();
/* 1452 */ if (localPaint == null) {
/* 1453 */ localPaint = WCGraphicsPrismContext.this.state.getPaintNoClone();
/* */ }
/* 1455 */ paramAnonymousGraphics.setPaint(localPaint);
/* 1456 */ paramAnonymousGraphics.drawRect(paramFloat1, paramFloat2, paramFloat3, paramFloat4);
/* */ }
/* */ }
/* 1444 */ .paint();
/* */ }
/* */
/* */ public void strokePath(final WCPath paramWCPath)
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 29 com/sun/webpane/sg/prism/WCGraphicsPrismContext:log Ljava/util/logging/Logger;
/* */ // 3: ldc_w 297
/* */ // 6: invokevirtual 39 java/util/logging/Logger:fine (Ljava/lang/String;)V
/* */ // 9: aload_1
/* */ // 10: ifnull +15 -> 25
/* */ // 13: new 298 com/sun/webpane/sg/prism/WCGraphicsPrismContext$15
/* */ // 16: dup
/* */ // 17: aload_0
/* */ // 18: aload_1
/* */ // 19: invokespecial 299 com/sun/webpane/sg/prism/WCGraphicsPrismContext$15:<init> (Lcom/sun/webpane/sg/prism/WCGraphicsPrismContext;Lcom/sun/webpane/platform/graphics/WCPath;)V
/* */ // 22: invokevirtual 300 com/sun/webpane/sg/prism/WCGraphicsPrismContext$15:paint ()V
/* */ // 25: return
/* */ }
/* */
/* */ public void fillPath(final WCPath paramWCPath)
/* */ {
/* */ // Byte code:
/* */ // 0: getstatic 29 com/sun/webpane/sg/prism/WCGraphicsPrismContext:log Ljava/util/logging/Logger;
/* */ // 3: ldc_w 301
/* */ // 6: invokevirtual 39 java/util/logging/Logger:fine (Ljava/lang/String;)V
/* */ // 9: aload_1
/* */ // 10: ifnull +15 -> 25
/* */ // 13: new 302 com/sun/webpane/sg/prism/WCGraphicsPrismContext$16
/* */ // 16: dup
/* */ // 17: aload_0
/* */ // 18: aload_1
/* */ // 19: invokespecial 303 com/sun/webpane/sg/prism/WCGraphicsPrismContext$16:<init> (Lcom/sun/webpane/sg/prism/WCGraphicsPrismContext;Lcom/sun/webpane/platform/graphics/WCPath;)V
/* */ // 22: invokevirtual 304 com/sun/webpane/sg/prism/WCGraphicsPrismContext$16:paint ()V
/* */ // 25: return
/* */ }
/* */
/* */ public void setTransform(WCTransform paramWCTransform)
/* */ {
/* 1509 */ double[] arrayOfDouble = paramWCTransform.getMatrix();
/* 1510 */ Affine3D localAffine3D = new Affine3D(new Affine2D(arrayOfDouble[0], arrayOfDouble[1], arrayOfDouble[2], arrayOfDouble[3], arrayOfDouble[4], arrayOfDouble[5]));
/* 1511 */ this.state.setTransform(localAffine3D);
/* 1512 */ resetCachedGraphics();
/* */ }
/* */
/* */ public WCTransform getTransform() {
/* 1516 */ Affine3D localAffine3D = this.state.getTransformNoClone();
/* 1517 */ return new WCTransform(localAffine3D.getMxx(), localAffine3D.getMyx(), localAffine3D.getMxy(), localAffine3D.getMyy(), localAffine3D.getMxt(), localAffine3D.getMyt());
/* */ }
/* */
/* */ public void concatTransform(WCTransform paramWCTransform)
/* */ {
/* 1523 */ double[] arrayOfDouble = paramWCTransform.getMatrix();
/* 1524 */ Affine3D localAffine3D = new Affine3D(new Affine2D(arrayOfDouble[0], arrayOfDouble[1], arrayOfDouble[2], arrayOfDouble[3], arrayOfDouble[4], arrayOfDouble[5]));
/* 1525 */ this.state.concatTransform(localAffine3D);
/* 1526 */ resetCachedGraphics();
/* */ }
/* */
/* */ public void dispose() {
/* 1530 */ if (!this.states.isEmpty()) {
/* 1531 */ new IllegalStateException("Unbalanced saveState/restoreState").printStackTrace();
/* */ }
/* */
/* 1534 */ while (!this.states.isEmpty()) {
/* 1535 */ restoreStateInternal();
/* */ }
/* */
/* 1538 */ Layer localLayer = this.state.getLayerNoClone();
/* 1539 */ if (localLayer != null)
/* 1540 */ renderLayer(localLayer);
/* */ }
/* */
/* */ public WCGradient createLinearGradient(WCPoint paramWCPoint1, WCPoint paramWCPoint2)
/* */ {
/* 1546 */ return new WCLinearGradient(paramWCPoint1, paramWCPoint2);