--- a/GraphicsContext.st Wed Aug 19 18:43:18 1998 +0200
+++ b/GraphicsContext.st Thu Aug 20 16:42:13 1998 +0200
@@ -1743,9 +1743,9 @@
!GraphicsContext methodsFor:'edge drawing'!
drawEdgesForX:x y:y width:w height:h level:l
- shadow:shadowColor light:lightColor
- halfShadow:halfShadowColor halfLight:halfLightColor
- style:edgeStyle
+ shadow:shadowColor light:lightColor
+ halfShadow:halfShadowColor halfLight:halfLightColor
+ style:edgeStyle
"draw 3D edges into a rectangle"
@@ -1759,22 +1759,22 @@
count := l.
(count < 0) ifTrue:[
- topLeftFg := shadowColor.
- botRightFg := lightColor.
- topLeftHalfFg := halfShadowColor.
- botRightHalfFg := halfLightColor.
- count := count negated
+ topLeftFg := shadowColor.
+ botRightFg := lightColor.
+ topLeftHalfFg := halfShadowColor.
+ botRightHalfFg := halfLightColor.
+ count := count negated
] ifFalse:[
- topLeftFg := lightColor.
- botRightFg := shadowColor.
- topLeftHalfFg := halfLightColor.
- botRightHalfFg := halfShadowColor.
+ topLeftFg := lightColor.
+ botRightFg := shadowColor.
+ topLeftHalfFg := halfLightColor.
+ botRightHalfFg := halfShadowColor.
].
topLeftHalfFg isNil ifTrue:[
- topLeftHalfFg := topLeftFg
+ topLeftHalfFg := topLeftFg
].
botRightHalfFg isNil ifTrue:[
- botRightHalfFg := botRightFg
+ botRightHalfFg := botRightFg
].
r := x + w - 1. "right"
@@ -1783,32 +1783,36 @@
self lineWidth:0.
"top and left edges"
- ((edgeStyle == #soft) and:["l" count > 0]) ifTrue:[
- paint := topLeftHalfFg
+ ((edgeStyle == #soft or:[edgeStyle == #softWin95]) and:["l" count > 0]) ifTrue:[
+ paint := topLeftHalfFg
] ifFalse:[
- paint := topLeftFg
+ paint := topLeftFg
].
self paint:paint.
0 to:(count - 1) do:[:i |
- run := y + i.
- run < b ifTrue:[
- self displayDeviceLineFromX:x y:run toX:r y:run. "top"
- ].
- run := x + i.
- self displayDeviceLineFromX:run y:y toX:run y:b "left"
+ run := y + i.
+ run < b ifTrue:[
+ self displayDeviceLineFromX:x y:run toX:r y:run. "top"
+ ].
+ run := x + i.
+ self displayDeviceLineFromX:run y:y toX:run y:b "left"
].
- (edgeStyle == #soft) ifTrue:[
+ (edgeStyle == #soft or:[edgeStyle == #softWin95]) ifTrue:[
"
- self paint:topLeftFg.
- self displayDeviceLineFromX:x y:y toX:r y:y.
- self displayDeviceLineFromX:x y:y toX:x y:b
+ self paint:topLeftFg.
+ self displayDeviceLineFromX:x y:y toX:r y:y.
+ self displayDeviceLineFromX:x y:y toX:x y:b
"
- (l > 2) ifTrue:[
- self paint:(device blackColor).
- self displayDeviceLineFromX:x y:y toX:r y:y.
- self displayDeviceLineFromX:x y:y toX:x y:b.
- ]
+ (l > 1) ifTrue:[
+ edgeStyle == #softWin95 ifTrue:[
+ self paint:(Color veryLightGrey).
+ ] ifFalse:[
+ self paint:halfLightColor.
+ ].
+ self displayDeviceLineFromX:x y:y toX:r y:y.
+ self displayDeviceLineFromX:x y:y toX:x y:b.
+ ]
].
xi := x + 1.
@@ -1820,32 +1824,34 @@
"/ ].
"bottom and right edges"
- (edgeStyle == #soft "new:" and:[count > 1]) ifTrue:[
- paint := botRightHalfFg
+ ((edgeStyle == #soft or:[edgeStyle == #softWin95])
+ "new:" and:[count > 1]) ifTrue:[
+ paint := botRightHalfFg
] ifFalse:[
- paint := botRightFg
+ paint := botRightFg
].
self paint:paint.
0 to:(count - 1) do:[:i |
- run := b - i.
- run > y ifTrue:[
- self displayDeviceLineFromX:xi-1 y:run toX:r y:run. "bottom"
- ].
- run := r - i.
- self displayDeviceLineFromX:run y:yi-1 toX:run y:b. "right"
- xi := xi + 1.
- yi := yi + 1
+ run := b - i.
+ run > y ifTrue:[
+ self displayDeviceLineFromX:xi-1 y:run toX:r y:run. "bottom"
+ ].
+ run := r - i.
+ self displayDeviceLineFromX:run y:yi-1 toX:run y:b. "right"
+ xi := xi + 1.
+ yi := yi + 1
].
- ((edgeStyle == #soft) and:[l > 1]) ifTrue:[
- self paint:(device blackColor) "shadowColor".
- self displayDeviceLineFromX:x y:b toX:r y:b.
- self displayDeviceLineFromX:r y:y toX:r y:b
+ ((edgeStyle == #soft or:[edgeStyle == #softWin95])
+ and:[l > 1]) ifTrue:[
+ self paint:(device blackColor) "shadowColor".
+ self displayDeviceLineFromX:x y:b toX:r y:b.
+ self displayDeviceLineFromX:r y:y toX:r y:b
].
self edgeDrawn:#all
- "Modified: 18.8.1997 / 01:37:50 / cg"
+ "Modified: / 20.8.1998 / 12:04:45 / cg"
!
edgeDrawn:whichOne
@@ -2015,6 +2021,6 @@
!GraphicsContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.66 1998-02-25 13:17:31 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.67 1998-08-20 14:42:13 cg Exp $'
! !
GraphicsContext initialize!