1116 angle:360 |
1116 angle:360 |
1117 |
1117 |
1118 "Modified: 8.5.1996 / 08:36:03 / cg" |
1118 "Modified: 8.5.1996 / 08:36:03 / cg" |
1119 ! |
1119 ! |
1120 |
1120 |
1121 displayForm:aForm at:aPoint |
1121 displayForm:aFormOrImage at:aPoint |
1122 "draw a form" |
1122 "draw a form (or image)" |
1123 |
1123 |
1124 self displayForm:aForm x:(aPoint x) y:(aPoint y) |
1124 self displayForm:aFormOrImage x:(aPoint x) y:(aPoint y) |
1125 ! |
1125 |
1126 |
1126 "Modified: 24.4.1997 / 16:00:11 / cg" |
1127 displayForm:aForm x:x y:y |
1127 ! |
1128 "draw a form at x/y; if the form has depth 1, 1's in the form are |
1128 |
|
1129 displayForm:aFormOrImage x:x y:y |
|
1130 "draw a form (or image) at x/y; |
|
1131 if the form has depth 1, 1's in the form are |
1129 drawn in current paint color, 0's are ignored. |
1132 drawn in current paint color, 0's are ignored. |
1130 If the form has depth ~~ 1, the result is undefined" |
1133 If the form has depth ~~ 1, the current fg color setting is ignored." |
1131 |
1134 |
1132 |fg bg f noColor| |
1135 |fg bg f noColor| |
|
1136 |
|
1137 aFormOrImage depth > 1 ifTrue:[ |
|
1138 self displayOpaqueForm:aFormOrImage x:x y:y. |
|
1139 ^ self. |
|
1140 ]. |
1133 |
1141 |
1134 fg := paint. |
1142 fg := paint. |
1135 bg := bgPaint. |
1143 bg := bgPaint. |
1136 f := function. |
1144 f := function. |
1137 |
1145 |
1139 self error:'function not supported'. |
1147 self error:'function not supported'. |
1140 ^ self |
1148 ^ self |
1141 ]. |
1149 ]. |
1142 |
1150 |
1143 noColor := Color noColor. |
1151 noColor := Color noColor. |
|
1152 |
1144 " |
1153 " |
1145 stamp out fg-pixels |
1154 stamp out fg-pixels |
1146 " |
1155 " |
1147 self paint:noColor on:Color allColor function:#and. |
1156 self paint:noColor on:Color allColor function:#and. |
1148 self displayOpaqueForm:aForm x:x y:y. |
1157 self displayOpaqueForm:aFormOrImage x:x y:y. |
|
1158 |
1149 " |
1159 " |
1150 or-in fg-pixels |
1160 or-in fg-pixels |
1151 " |
1161 " |
1152 self paint:fg on:Color noColor function:#or. |
1162 self paint:fg on:Color noColor function:#or. |
1153 self displayOpaqueForm:aForm x:x y:y. |
1163 self displayOpaqueForm:aFormOrImage x:x y:y. |
1154 self paint:fg on:fg function:f. |
1164 self paint:fg on:fg function:f. |
1155 |
1165 |
1156 "Modified: 28.5.1996 / 17:10:28 / cg" |
1166 "Modified: 24.4.1997 / 16:01:43 / cg" |
|
1167 ! |
|
1168 |
|
1169 displayImage:aFormOrImage at:aPoint |
|
1170 "draw an image (or form). |
|
1171 Provided for ST-80 compatibilty; |
|
1172 in ST/X, images are also handled by #displayForm:" |
|
1173 |
|
1174 self displayForm:aFormOrImage x:(aPoint x) y:(aPoint y) |
|
1175 |
|
1176 "Modified: 24.4.1997 / 16:02:43 / cg" |
|
1177 ! |
|
1178 |
|
1179 displayImage:aFormOrImage x:x y:y |
|
1180 "draw an image (or form). |
|
1181 Provided for ST-80 compatibilty; |
|
1182 in ST/X, images are also handled by #displayForm:" |
|
1183 |
|
1184 self displayForm:aFormOrImage x:x y:y |
|
1185 |
|
1186 "Created: 24.4.1997 / 16:03:03 / cg" |
1157 ! |
1187 ! |
1158 |
1188 |
1159 displayLineFrom:point1 to:point2 |
1189 displayLineFrom:point1 to:point2 |
1160 "draw a line" |
1190 "draw a line" |
1161 |
1191 |