Changing graphics contexts
Several graphics context attributes can be modified at once using the changeGC:values: message. The following example creates a GC with default attributes, then changes the foreground and background colors.
| gc |
gc := CgWindow default
createGC: None
values: nil.
changeGC: GCForeground | GCBackground
(CgGCValues new
foreground: CgWindow default blackPixel;
background: CgWindow default whitePixel).
Last modified date: 01/29/2015