1232 |
1232 |
1233 initGC |
1233 initGC |
1234 "stop server from sending exposure events for Forms - |
1234 "stop server from sending exposure events for Forms - |
1235 (will fill up stream-queue on some stupid (i.e. sco) systems" |
1235 (will fill up stream-queue on some stupid (i.e. sco) systems" |
1236 |
1236 |
|
1237 "/ depth-1 forms draw differently ... |
|
1238 |
|
1239 depth == 1 ifTrue:[ |
|
1240 foreground isNil ifTrue:[ |
|
1241 foreground := paint := Color colorId:1. |
|
1242 ]. |
|
1243 background isNil ifTrue:[ |
|
1244 background := bgPaint := Color colorId:0 |
|
1245 ] |
|
1246 ]. |
1237 super initGC. |
1247 super initGC. |
1238 self setGraphicsExposures:false |
1248 self setGraphicsExposures:false |
1239 |
1249 |
1240 "Modified: 11.6.1996 / 21:21:34 / cg" |
1250 "Modified: 17.7.1996 / 13:21:24 / cg" |
1241 ! |
1251 ! |
1242 |
1252 |
1243 initialize |
1253 initialize |
|
1254 foreground := paint := Color colorId:1. |
|
1255 background := bgPaint := Color colorId:0. |
|
1256 |
1244 super initialize. |
1257 super initialize. |
1245 depth := 1. |
1258 depth := 1. |
1246 foreground isNil ifTrue:[ |
1259 |
1247 foreground := paint := Color colorId:1. |
1260 "/ foreground isNil ifTrue:[ |
1248 ]. |
1261 "/ foreground := Color colorId:1. |
1249 background isNil ifTrue:[ |
1262 "/ ]. |
1250 background := bgPaint := Color colorId:0 |
1263 "/ paint isNil ifTrue:[ |
1251 ] |
1264 "/ paint := foreground. |
1252 |
1265 "/ ]. |
1253 "Modified: 11.6.1996 / 21:17:05 / cg" |
1266 "/ background isNil ifTrue:[ |
|
1267 "/ background := Color colorId:0 |
|
1268 "/ ]. |
|
1269 "/ bgPaint isNil ifTrue:[ |
|
1270 "/ bgPaint := background |
|
1271 "/ ] |
|
1272 |
|
1273 "Modified: 17.7.1996 / 13:02:01 / cg" |
1254 ! |
1274 ! |
1255 |
1275 |
1256 recreate |
1276 recreate |
1257 "reconstruct the form after a snapin" |
1277 "reconstruct the form after a snapin" |
1258 |
1278 |
1561 colorFromValue:pixel |
1581 colorFromValue:pixel |
1562 localColorMap notNil ifTrue:[ |
1582 localColorMap notNil ifTrue:[ |
1563 ^ localColorMap at:(pixel + 1) |
1583 ^ localColorMap at:(pixel + 1) |
1564 ]. |
1584 ]. |
1565 depth == 1 ifTrue:[ |
1585 depth == 1 ifTrue:[ |
1566 pixel == 0 ifTrue:[^ Color white]. |
1586 pixel == 0 ifTrue:[^ White]. |
1567 ^ Color black |
1587 ^ Black |
1568 ]. |
1588 ]. |
1569 ^ Color black |
1589 ^ Black |
1570 |
1590 |
1571 "Created: 28.6.1996 / 16:10:13 / cg" |
1591 "Created: 28.6.1996 / 16:10:13 / cg" |
1572 "Modified: 28.6.1996 / 16:10:23 / cg" |
1592 "Modified: 17.7.1996 / 13:05:59 / cg" |
1573 ! |
1593 ! |
1574 |
1594 |
1575 hasBits |
1595 hasBits |
1576 "return true, if the receiver has its pixel data available. |
1596 "return true, if the receiver has its pixel data available. |
1577 For forms, which were created from data, this is always true. |
1597 For forms, which were created from data, this is always true. |