Commit 412ffc4
committed
Rework new Image constructors accepting a ImageGcDrawer
When implementing the ImageGCDrawer as lambda, the resulting code is
better to read if the ImageGCDrawer is passed as last argument:
'''
new Image(device, 16, 16, (gc, w, h) -> {
gc.draw ...
})
'''
Furthermore this way the argument order also better reflects the order
in which the arguments are applied:
1. an image with the given size is created.
2. the GC draws on that image
Follow-up on
- #17341 parent 0f466b3 commit 412ffc4
File tree
5 files changed
+42
-16
lines changed- bundles/org.eclipse.swt
- Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom
- Eclipse SWT
- cocoa/org/eclipse/swt/graphics
- gtk/org/eclipse/swt/graphics
- win32/org/eclipse/swt/graphics
5 files changed
+42
-16
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | | - | |
746 | | - | |
| 745 | + | |
747 | 746 | | |
748 | 747 | | |
749 | 748 | | |
| |||
4007 | 4006 | | |
4008 | 4007 | | |
4009 | 4008 | | |
4010 | | - | |
| 4009 | + | |
| 4010 | + | |
4011 | 4011 | | |
4012 | 4012 | | |
4013 | 4013 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
1596 | | - | |
| 1596 | + | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
1604 | | - | |
| 1603 | + | |
1605 | 1604 | | |
1606 | 1605 | | |
1607 | 1606 | | |
1608 | 1607 | | |
1609 | 1608 | | |
1610 | 1609 | | |
1611 | 1610 | | |
1612 | | - | |
| 1611 | + | |
1613 | 1612 | | |
1614 | 1613 | | |
1615 | 1614 | | |
1616 | 1615 | | |
1617 | 1616 | | |
1618 | 1617 | | |
1619 | | - | |
1620 | | - | |
| 1618 | + | |
1621 | 1619 | | |
| 1620 | + | |
1622 | 1621 | | |
1623 | 1622 | | |
1624 | 1623 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
881 | | - | |
| 881 | + | |
882 | 882 | | |
883 | | - | |
| 883 | + | |
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
908 | 917 | | |
909 | 918 | | |
910 | 919 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
687 | 696 | | |
688 | 697 | | |
689 | 698 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
| 632 | + | |
633 | 633 | | |
634 | | - | |
| 634 | + | |
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
641 | 650 | | |
642 | 651 | | |
643 | 652 | | |
| |||
0 commit comments