6 X11ResourceObject subclass: X11Color [
10 ^self error: 'X11Color can''t be created with #new'.
16 self in: obj at: 1 put: (X11Singleton XNewColor: r g: g b: b).
21 ^self new: 0 g: 0 b: 0.
25 ^self new: 1.0 g: 1.0 b: 1.0.
30 "'free color: ' print. color printNl."
31 X11Singleton XFreeColor: color. color := nil
41 X11ResourceObject subclass: X11GC [
42 | gc fgcolor bgcolor linestyle capstyle joinstyle width |
45 ^self error: 'X11GC can''t be created with #new'.
52 in: obj at: 1 put: (X11Singleton XCreateGC: wid);
53 in: obj at: 2 put: X11Color white;
54 in: obj at: 3 put: X11Color black;
63 ^new: wid fgColor: aClr [
67 in: obj at: 1 put: (X11Singleton XCreateGC: wid fgColor: aClr color);
68 in: obj at: 2 put: aClr;
69 in: obj at: 3 put: X11Color black.
74 gc ifNotNil: [ X11Singleton XFreeGC: gc. gc := nil ]
83 X11Singleton fgColor: gc color: aClr color.
88 X11Singleton bgColor: gc color: aClr color.
92 X11Singleton XSetLineAttr: gc
104 ^self realizeLineStyle
112 ^self realizeLineStyle