319 |
319 |
320 copyBits:aRectangle from:aForm at:srcOrigin clippingBox:clippingBox rule:rule fillColor:fillColor |
320 copyBits:aRectangle from:aForm at:srcOrigin clippingBox:clippingBox rule:rule fillColor:fillColor |
321 |f oldClip oldFunction| |
321 |f oldClip oldFunction| |
322 |
322 |
323 (f := rule) isInteger ifTrue:[ |
323 (f := rule) isInteger ifTrue:[ |
324 "/ ST-80 compatibility: numeric rule |
324 "/ ST-80 compatibility: numeric rule |
325 f := #(clear and andReverse copy andInverted noop xor or nor equiv invert orInverted copyInverted |
325 f := #(clear and andReverse copy andInverted noop xor or nor equiv invert orInverted copyInverted |
326 orReverse nand set) at:(rule + 1). |
326 orReverse nand set) at:(rule + 1). |
327 ]. |
327 ]. |
328 |
328 |
329 oldFunction := gc function. |
329 oldFunction := gc function. |
330 oldClip := gc clippingRectangleOrNil. |
330 oldClip := gc clippingBoundsOrNil. |
331 |
331 |
332 gc clippingRectangle:clippingBox. |
332 gc clippingBounds:clippingBox. |
333 gc function:f. |
333 gc function:f. |
334 |
334 |
335 gc |
335 gc |
336 copyFrom:aForm |
336 copyFrom:aForm |
337 x:srcOrigin x y:srcOrigin y |
337 x:srcOrigin x y:srcOrigin y |
338 toX:aRectangle left y:aRectangle top |
338 toX:aRectangle left y:aRectangle top |
339 width:aRectangle width height:aRectangle height. |
339 width:aRectangle width height:aRectangle height. |
340 |
340 |
341 gc clippingRectangle:oldClip. |
341 gc clippingBounds:oldClip. |
342 gc function:oldFunction. |
342 gc function:oldFunction. |
343 |
343 |
344 " |
344 " |
345 |dst src| |
345 |dst src| |
346 |
346 |
347 dst := Form width:8 height:8 fromArray:#[ |
347 dst := Form width:8 height:8 fromArray:#[ |
348 2r00000000 |
348 2r00000000 |
349 2r00000000 |
349 2r00000000 |
350 2r00000000 |
350 2r00000000 |
351 2r00000000 |
351 2r00000000 |
352 2r11111111 |
352 2r11111111 |
353 2r11111111 |
353 2r11111111 |
354 2r11111111 |
354 2r11111111 |
355 2r11111111 |
355 2r11111111 |
356 ]. |
356 ]. |
357 src := Form width:8 height:8 fromArray:#[ |
357 src := Form width:8 height:8 fromArray:#[ |
358 2r00001111 |
358 2r00001111 |
359 2r00001111 |
359 2r00001111 |
360 2r00001111 |
360 2r00001111 |
361 2r00001111 |
361 2r00001111 |
362 2r00001111 |
362 2r00001111 |
363 2r00001111 |
363 2r00001111 |
364 2r00001111 |
364 2r00001111 |
365 2r00001111 |
365 2r00001111 |
366 ]. |
366 ]. |
367 |
367 |
368 dst copyBits:(0@0 corner:8@8) from:src at:0@0 clippingBox:(0@0 corner:8@8) rule:15 fillColor:Color black. |
368 dst copyBits:(0@0 corner:8@8) from:src at:0@0 clippingBox:(0@0 corner:8@8) rule:15 fillColor:Color black. |
369 dst inspect |
369 dst inspect |
370 |
370 |
371 " |
371 " |
765 |
765 |
766 deviceClippingRectangle:aRectangleOrNil |
766 deviceClippingRectangle:aRectangleOrNil |
767 "set the clipping rectangle for drawing (in device coordinates); |
767 "set the clipping rectangle for drawing (in device coordinates); |
768 a nil argument turns off clipping (i.e. whole view is drawable - incl. margins)" |
768 a nil argument turns off clipping (i.e. whole view is drawable - incl. margins)" |
769 |
769 |
770 gc deviceClippingRectangle:aRectangleOrNil |
770 gc deviceClippingBounds:aRectangleOrNil |
771 ! |
771 ! |
772 |
772 |
773 drawableId |
773 drawableId |
774 "return the id of the drawable on the device" |
774 "return the id of the drawable on the device" |
775 |
775 |
1172 foreground:fgColor background:bgColor function:fun |
1172 foreground:fgColor background:bgColor function:fun |
1173 <resource: #obsolete> |
1173 <resource: #obsolete> |
1174 "set foreground, background colors and function. |
1174 "set foreground, background colors and function. |
1175 OBSOLETE: this method will vanish; use #paint: / #paint:on:" |
1175 OBSOLETE: this method will vanish; use #paint: / #paint:on:" |
1176 |
1176 |
1177 self foreground:fgColor background:bgColor. |
1177 gc foreground:fgColor background:bgColor. |
1178 self function:fun |
1178 gc function:fun |
1179 |
1179 |
1180 "Modified: 12.5.1996 / 22:28:34 / cg" |
1180 "Modified: 12.5.1996 / 22:28:34 / cg" |
1181 ! |
1181 ! |
1182 |
1182 |
1183 foreground:aColor function:fun |
1183 foreground:aColor function:fun |