Commit f47c71d
committed
Adding DynamicallySizableImageDataProvider Interface
Implementations of DynamicallySizableImageDataProvider can provide image
data at a requested targetHeight and targetWidth. The behavior of
GC#drawImage() is updated: when drawing a dynamically sizeable image, it
requests a handle at the target size. If the image can be loaded at that
size, it is used directly; otherwise, the image is loaded as before and
scaled using zoom.
In the Windows implementation, if the source or destination width/height
is set to zero, the image will be drawn fully, avoiding the need to call
getBounds() to determine the image size.1 parent bd7b7dc commit f47c71d
File tree
9 files changed
+288
-31
lines changed- bundles/org.eclipse.swt/Eclipse SWT
- cocoa/org/eclipse/swt/graphics
- common/org/eclipse/swt
- graphics
- internal
- image
- gtk/org/eclipse/swt/graphics
- win32/org/eclipse/swt/graphics
9 files changed
+288
-31
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1820 | 1820 | | |
1821 | 1821 | | |
1822 | 1822 | | |
1823 | | - | |
| 1823 | + | |
| 1824 | + | |
1824 | 1825 | | |
1825 | 1826 | | |
1826 | 1827 | | |
1827 | | - | |
| 1828 | + | |
1828 | 1829 | | |
1829 | 1830 | | |
1830 | 1831 | | |
| |||
1833 | 1834 | | |
1834 | 1835 | | |
1835 | 1836 | | |
1836 | | - | |
1837 | | - | |
| 1837 | + | |
1838 | 1838 | | |
1839 | 1839 | | |
1840 | 1840 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
232 | 245 | | |
233 | 246 | | |
234 | 247 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
149 | 159 | | |
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
156 | | - | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
| |||
170 | 180 | | |
171 | 181 | | |
172 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
173 | 187 | | |
174 | 188 | | |
175 | 189 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1581 | 1581 | | |
1582 | 1582 | | |
1583 | 1583 | | |
1584 | | - | |
| 1584 | + | |
| 1585 | + | |
1585 | 1586 | | |
1586 | 1587 | | |
1587 | 1588 | | |
1588 | | - | |
| 1589 | + | |
1589 | 1590 | | |
1590 | 1591 | | |
1591 | 1592 | | |
| |||
1594 | 1595 | | |
1595 | 1596 | | |
1596 | 1597 | | |
1597 | | - | |
| 1598 | + | |
1598 | 1599 | | |
1599 | 1600 | | |
1600 | 1601 | | |
| |||
Lines changed: 58 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
1056 | | - | |
| 1056 | + | |
| 1057 | + | |
1057 | 1058 | | |
1058 | 1059 | | |
1059 | 1060 | | |
| |||
1091 | 1092 | | |
1092 | 1093 | | |
1093 | 1094 | | |
1094 | | - | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1095 | 1099 | | |
1096 | 1100 | | |
1097 | 1101 | | |
| |||
1156 | 1160 | | |
1157 | 1161 | | |
1158 | 1162 | | |
1159 | | - | |
1160 | | - | |
| 1163 | + | |
| 1164 | + | |
1161 | 1165 | | |
1162 | 1166 | | |
1163 | 1167 | | |
| |||
1174 | 1178 | | |
1175 | 1179 | | |
1176 | 1180 | | |
1177 | | - | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1178 | 1222 | | |
1179 | 1223 | | |
1180 | 1224 | | |
| |||
1191 | 1235 | | |
1192 | 1236 | | |
1193 | 1237 | | |
1194 | | - | |
| 1238 | + | |
| 1239 | + | |
1195 | 1240 | | |
1196 | 1241 | | |
1197 | 1242 | | |
1198 | | - | |
| 1243 | + | |
1199 | 1244 | | |
1200 | 1245 | | |
1201 | | - | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
1202 | 1249 | | |
1203 | 1250 | | |
1204 | 1251 | | |
1205 | | - | |
1206 | 1252 | | |
1207 | 1253 | | |
1208 | 1254 | | |
| |||
1253 | 1299 | | |
1254 | 1300 | | |
1255 | 1301 | | |
1256 | | - | |
1257 | 1302 | | |
1258 | 1303 | | |
1259 | | - | |
| 1304 | + | |
| 1305 | + | |
1260 | 1306 | | |
1261 | 1307 | | |
1262 | | - | |
| 1308 | + | |
1263 | 1309 | | |
1264 | 1310 | | |
1265 | 1311 | | |
| |||
0 commit comments