--- a/XWorkstat.st Wed Mar 19 11:11:54 1997 +0100
+++ b/XWorkstat.st Wed Mar 19 11:13:45 1997 +0100
@@ -6042,76 +6042,6 @@
self primitiveFailed
!
-setForeground:fgColor background:bgColor mask:aBitmapId in:aGCId
- "set foreground and background colors to be drawn with using mask or
- solid (if aBitmapId is nil)"
-
-%{ /* NOCONTEXT */
-
- GC gc;
-
- if (ISCONNECTED) {
- Display *dpy = myDpy;
-
- if (__isExternalAddress(aGCId)) {
- gc = _GCVal(aGCId);
- if (__isSmallInteger(fgColor))
- XSetForeground(dpy, gc, __intVal(fgColor));
- if (__isSmallInteger(bgColor))
- XSetBackground(dpy, gc, __intVal(bgColor));
-
- if (__isExternalAddress(aBitmapId)) {
- XSetStipple(dpy, gc, _PixmapVal(aBitmapId));
- XSetFillStyle(dpy, gc, FillOpaqueStippled);
- RETURN ( self );
- }
- if (aBitmapId == nil) {
- XSetFillStyle(dpy, gc, FillSolid);
- RETURN ( self );
- }
- }
- }
-%}.
- self primitiveFailed
-!
-
-setForeground:fgColor background:bgColor mask:aBitmapId lineWidth:lw in:aGCId
- "set foreground and background colors to be drawn with using mask or
- solid (if aBitmapId is nil); also set lineWidth"
-
-%{ /* NOCONTEXT */
-
- GC gc;
-
- if (ISCONNECTED) {
- Display *dpy = myDpy;
-
- if (__isExternalAddress(aGCId)) {
- gc = _GCVal(aGCId);
- if (__isSmallInteger(lw)) {
- XSetLineAttributes(dpy, gc, __intVal(lw),
- LineSolid, CapNotLast, JoinMiter);
- }
- if (__isSmallInteger(fgColor))
- XSetForeground(dpy, gc, __intVal(fgColor));
- if (__isSmallInteger(bgColor))
- XSetBackground(dpy, gc, __intVal(bgColor));
-
- if (__isExternalAddress(aBitmapId)) {
- XSetStipple(dpy, gc, _PixmapVal(aBitmapId));
- XSetFillStyle(dpy, gc, FillOpaqueStippled);
- RETURN ( self );
- }
- if (aBitmapId == nil) {
- XSetFillStyle(dpy, gc, FillSolid);
- RETURN ( self );
- }
- }
- }
-%}.
- self primitiveFailed
-!
-
setForeground:fgColorIndex in:aGCId
"set foreground color to be drawn with"
@@ -6180,41 +6110,45 @@
!
setLineWidth:aNumber style:lineStyle cap:capStyle join:joinStyle in:aGCId
- "set line attributes"
+ "set line attributes;
+ lineStyle must be one of #solid, #dashed or #doubleDashed;
+ capStyle one of: #notLast, #butt, #round or #projecting;
+ joinStyle one of: #miter, #bevel or #round."
%{ /* NOCONTEXT */
int x_style, x_cap, x_join;
if (ISCONNECTED) {
- if (__isExternalAddress(aGCId)
- && __isSmallInteger(aNumber)) {
- if (lineStyle == @symbol(solid)) x_style = LineSolid;
- else if (lineStyle == @symbol(dashed)) x_style = LineOnOffDash;
- else if (lineStyle == @symbol(doubleDashed)) x_style = LineDoubleDash;
- else goto bad;
-
- if (capStyle == @symbol(notLast)) x_cap = CapNotLast;
- else if (capStyle == @symbol(butt)) x_cap = CapButt;
- else if (capStyle == @symbol(round)) x_cap = CapRound;
- else if (capStyle == @symbol(projecting)) x_cap = CapProjecting;
- else goto bad;
-
- if (joinStyle == @symbol(miter)) x_join = JoinMiter;
- else if (joinStyle == @symbol(bevel)) x_join = JoinBevel;
- else if (joinStyle == @symbol(round)) x_join = JoinRound;
- else goto bad;
-
- XSetLineAttributes(myDpy,
- _GCVal(aGCId), __intVal(aNumber),
- x_style, x_cap, x_join);
- RETURN ( self );
- }
+ if (__isExternalAddress(aGCId)
+ && __isSmallInteger(aNumber)) {
+ if (lineStyle == @symbol(solid)) x_style = LineSolid;
+ else if (lineStyle == @symbol(dashed)) x_style = LineOnOffDash;
+ else if (lineStyle == @symbol(doubleDashed)) x_style = LineDoubleDash;
+ else goto bad;
+
+ if (capStyle == @symbol(notLast)) x_cap = CapNotLast;
+ else if (capStyle == @symbol(butt)) x_cap = CapButt;
+ else if (capStyle == @symbol(round)) x_cap = CapRound;
+ else if (capStyle == @symbol(projecting)) x_cap = CapProjecting;
+ else goto bad;
+
+ if (joinStyle == @symbol(miter)) x_join = JoinMiter;
+ else if (joinStyle == @symbol(bevel)) x_join = JoinBevel;
+ else if (joinStyle == @symbol(round)) x_join = JoinRound;
+ else goto bad;
+
+ XSetLineAttributes(myDpy,
+ _GCVal(aGCId), __intVal(aNumber),
+ x_style, x_cap, x_join);
+ RETURN ( self );
+ }
}
bad: ;
%}.
"
either aGCId is invalid,
+ and/or lineWidth is not a smallInteger,
and/or lineStyle is none of #solid, #dashed, #doubleDashed
and/or capStyle is none of #notLast, #butt, #round, #projecting
and/or joinStyle is none of #miter, #bevel, #round
@@ -8644,6 +8578,6 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.212 1997-03-06 01:41:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.213 1997-03-19 10:13:45 cg Exp $'
! !
XWorkstation initialize!
--- a/XWorkstation.st Wed Mar 19 11:11:54 1997 +0100
+++ b/XWorkstation.st Wed Mar 19 11:13:45 1997 +0100
@@ -6042,76 +6042,6 @@
self primitiveFailed
!
-setForeground:fgColor background:bgColor mask:aBitmapId in:aGCId
- "set foreground and background colors to be drawn with using mask or
- solid (if aBitmapId is nil)"
-
-%{ /* NOCONTEXT */
-
- GC gc;
-
- if (ISCONNECTED) {
- Display *dpy = myDpy;
-
- if (__isExternalAddress(aGCId)) {
- gc = _GCVal(aGCId);
- if (__isSmallInteger(fgColor))
- XSetForeground(dpy, gc, __intVal(fgColor));
- if (__isSmallInteger(bgColor))
- XSetBackground(dpy, gc, __intVal(bgColor));
-
- if (__isExternalAddress(aBitmapId)) {
- XSetStipple(dpy, gc, _PixmapVal(aBitmapId));
- XSetFillStyle(dpy, gc, FillOpaqueStippled);
- RETURN ( self );
- }
- if (aBitmapId == nil) {
- XSetFillStyle(dpy, gc, FillSolid);
- RETURN ( self );
- }
- }
- }
-%}.
- self primitiveFailed
-!
-
-setForeground:fgColor background:bgColor mask:aBitmapId lineWidth:lw in:aGCId
- "set foreground and background colors to be drawn with using mask or
- solid (if aBitmapId is nil); also set lineWidth"
-
-%{ /* NOCONTEXT */
-
- GC gc;
-
- if (ISCONNECTED) {
- Display *dpy = myDpy;
-
- if (__isExternalAddress(aGCId)) {
- gc = _GCVal(aGCId);
- if (__isSmallInteger(lw)) {
- XSetLineAttributes(dpy, gc, __intVal(lw),
- LineSolid, CapNotLast, JoinMiter);
- }
- if (__isSmallInteger(fgColor))
- XSetForeground(dpy, gc, __intVal(fgColor));
- if (__isSmallInteger(bgColor))
- XSetBackground(dpy, gc, __intVal(bgColor));
-
- if (__isExternalAddress(aBitmapId)) {
- XSetStipple(dpy, gc, _PixmapVal(aBitmapId));
- XSetFillStyle(dpy, gc, FillOpaqueStippled);
- RETURN ( self );
- }
- if (aBitmapId == nil) {
- XSetFillStyle(dpy, gc, FillSolid);
- RETURN ( self );
- }
- }
- }
-%}.
- self primitiveFailed
-!
-
setForeground:fgColorIndex in:aGCId
"set foreground color to be drawn with"
@@ -6180,41 +6110,45 @@
!
setLineWidth:aNumber style:lineStyle cap:capStyle join:joinStyle in:aGCId
- "set line attributes"
+ "set line attributes;
+ lineStyle must be one of #solid, #dashed or #doubleDashed;
+ capStyle one of: #notLast, #butt, #round or #projecting;
+ joinStyle one of: #miter, #bevel or #round."
%{ /* NOCONTEXT */
int x_style, x_cap, x_join;
if (ISCONNECTED) {
- if (__isExternalAddress(aGCId)
- && __isSmallInteger(aNumber)) {
- if (lineStyle == @symbol(solid)) x_style = LineSolid;
- else if (lineStyle == @symbol(dashed)) x_style = LineOnOffDash;
- else if (lineStyle == @symbol(doubleDashed)) x_style = LineDoubleDash;
- else goto bad;
-
- if (capStyle == @symbol(notLast)) x_cap = CapNotLast;
- else if (capStyle == @symbol(butt)) x_cap = CapButt;
- else if (capStyle == @symbol(round)) x_cap = CapRound;
- else if (capStyle == @symbol(projecting)) x_cap = CapProjecting;
- else goto bad;
-
- if (joinStyle == @symbol(miter)) x_join = JoinMiter;
- else if (joinStyle == @symbol(bevel)) x_join = JoinBevel;
- else if (joinStyle == @symbol(round)) x_join = JoinRound;
- else goto bad;
-
- XSetLineAttributes(myDpy,
- _GCVal(aGCId), __intVal(aNumber),
- x_style, x_cap, x_join);
- RETURN ( self );
- }
+ if (__isExternalAddress(aGCId)
+ && __isSmallInteger(aNumber)) {
+ if (lineStyle == @symbol(solid)) x_style = LineSolid;
+ else if (lineStyle == @symbol(dashed)) x_style = LineOnOffDash;
+ else if (lineStyle == @symbol(doubleDashed)) x_style = LineDoubleDash;
+ else goto bad;
+
+ if (capStyle == @symbol(notLast)) x_cap = CapNotLast;
+ else if (capStyle == @symbol(butt)) x_cap = CapButt;
+ else if (capStyle == @symbol(round)) x_cap = CapRound;
+ else if (capStyle == @symbol(projecting)) x_cap = CapProjecting;
+ else goto bad;
+
+ if (joinStyle == @symbol(miter)) x_join = JoinMiter;
+ else if (joinStyle == @symbol(bevel)) x_join = JoinBevel;
+ else if (joinStyle == @symbol(round)) x_join = JoinRound;
+ else goto bad;
+
+ XSetLineAttributes(myDpy,
+ _GCVal(aGCId), __intVal(aNumber),
+ x_style, x_cap, x_join);
+ RETURN ( self );
+ }
}
bad: ;
%}.
"
either aGCId is invalid,
+ and/or lineWidth is not a smallInteger,
and/or lineStyle is none of #solid, #dashed, #doubleDashed
and/or capStyle is none of #notLast, #butt, #round, #projecting
and/or joinStyle is none of #miter, #bevel, #round
@@ -8644,6 +8578,6 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.212 1997-03-06 01:41:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.213 1997-03-19 10:13:45 cg Exp $'
! !
XWorkstation initialize!