added lineStyle/capStyle & joinStyle
authorClaus Gittinger <cg@exept.de>
Sun, 12 May 1996 22:30:21 +0200
changeset 262 55b430276719
parent 261 6d7941a96ad0
child 263 091fa4a2f558
added lineStyle/capStyle & joinStyle
StrokeWrpr.st
StrokingWrapper.st
--- a/StrokeWrpr.st	Sun May 12 22:06:13 1996 +0200
+++ b/StrokeWrpr.st	Sun May 12 22:30:21 1996 +0200
@@ -12,7 +12,7 @@
 
 
 GeometricWrapper subclass:#StrokingWrapper
-	instanceVariableNames:'lineWidth'
+	instanceVariableNames:'lineWidth lineStyle capStyle joinStyle'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Graphics-Display Objects'
@@ -109,6 +109,60 @@
     "Modified: 9.5.1996 / 00:09:06 / cg"
 !
 
+capStyle
+    "return the capStyle"
+
+    ^ capStyle
+
+    "Created: 8.5.1996 / 23:22:04 / cg"
+    "Modified: 9.5.1996 / 00:09:12 / cg"
+!
+
+capStyle:aSymbol
+    "set the capStyle"
+
+    capStyle := aSymbol
+
+    "Created: 8.5.1996 / 23:22:13 / cg"
+    "Modified: 9.5.1996 / 00:09:17 / cg"
+!
+
+joinStyle
+    "return the joinStyle"
+
+    ^ joinStyle
+
+    "Created: 8.5.1996 / 23:22:04 / cg"
+    "Modified: 9.5.1996 / 00:09:12 / cg"
+!
+
+joinStyle:aSymbol
+    "set the joinStyle"
+
+    joinStyle := aSymbol
+
+    "Created: 8.5.1996 / 23:22:13 / cg"
+    "Modified: 9.5.1996 / 00:09:17 / cg"
+!
+
+lineStyle
+    "return the lineStyle"
+
+    ^ lineStyle
+
+    "Created: 8.5.1996 / 23:22:04 / cg"
+    "Modified: 9.5.1996 / 00:09:12 / cg"
+!
+
+lineStyle:aSymbol
+    "set the lineStyle"
+
+    lineStyle := aSymbol
+
+    "Created: 8.5.1996 / 23:22:13 / cg"
+    "Modified: 9.5.1996 / 00:09:17 / cg"
+!
+
 lineWidth
     "return the lineWidth"
 
@@ -141,17 +195,27 @@
 displayOn:aGC
     "display myself - here, display the geometric object asStroked"
 
-    |prevLineWidth prevFg|
+    |prevLineWidth prevLineStyle prevCapStyle prevJoinStyle 
+     prevFg|
 
     prevLineWidth := aGC lineWidth.
+    prevLineStyle := aGC lineStyle.
+    prevJoinStyle := aGC joinStyle.
+    prevCapStyle  := aGC capStyle.
     prevFg := aGC paint.
 
     aGC lineWidth:lineWidth.
+    aGC lineStyle:lineStyle.
+    aGC joinStyle:joinStyle.
+    aGC capStyle:capStyle.
     aGC paint:fgColor.
 
     component displayStrokedOn:aGC.
 
     aGC lineWidth:prevLineWidth.
+    aGC lineStyle:prevLineStyle.
+    aGC joinStyle:prevJoinStyle.
+    aGC capStyle:prevCapStyle.
     aGC paint:prevFg.
 
     "Created: 8.5.1996 / 23:24:04 / cg"
@@ -173,5 +237,5 @@
 !StrokingWrapper class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/StrokeWrpr.st,v 1.5 1996-05-09 08:43:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/StrokeWrpr.st,v 1.6 1996-05-12 20:30:21 cg Exp $'
 ! !
--- a/StrokingWrapper.st	Sun May 12 22:06:13 1996 +0200
+++ b/StrokingWrapper.st	Sun May 12 22:30:21 1996 +0200
@@ -12,7 +12,7 @@
 
 
 GeometricWrapper subclass:#StrokingWrapper
-	instanceVariableNames:'lineWidth'
+	instanceVariableNames:'lineWidth lineStyle capStyle joinStyle'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Graphics-Display Objects'
@@ -109,6 +109,60 @@
     "Modified: 9.5.1996 / 00:09:06 / cg"
 !
 
+capStyle
+    "return the capStyle"
+
+    ^ capStyle
+
+    "Created: 8.5.1996 / 23:22:04 / cg"
+    "Modified: 9.5.1996 / 00:09:12 / cg"
+!
+
+capStyle:aSymbol
+    "set the capStyle"
+
+    capStyle := aSymbol
+
+    "Created: 8.5.1996 / 23:22:13 / cg"
+    "Modified: 9.5.1996 / 00:09:17 / cg"
+!
+
+joinStyle
+    "return the joinStyle"
+
+    ^ joinStyle
+
+    "Created: 8.5.1996 / 23:22:04 / cg"
+    "Modified: 9.5.1996 / 00:09:12 / cg"
+!
+
+joinStyle:aSymbol
+    "set the joinStyle"
+
+    joinStyle := aSymbol
+
+    "Created: 8.5.1996 / 23:22:13 / cg"
+    "Modified: 9.5.1996 / 00:09:17 / cg"
+!
+
+lineStyle
+    "return the lineStyle"
+
+    ^ lineStyle
+
+    "Created: 8.5.1996 / 23:22:04 / cg"
+    "Modified: 9.5.1996 / 00:09:12 / cg"
+!
+
+lineStyle:aSymbol
+    "set the lineStyle"
+
+    lineStyle := aSymbol
+
+    "Created: 8.5.1996 / 23:22:13 / cg"
+    "Modified: 9.5.1996 / 00:09:17 / cg"
+!
+
 lineWidth
     "return the lineWidth"
 
@@ -141,17 +195,27 @@
 displayOn:aGC
     "display myself - here, display the geometric object asStroked"
 
-    |prevLineWidth prevFg|
+    |prevLineWidth prevLineStyle prevCapStyle prevJoinStyle 
+     prevFg|
 
     prevLineWidth := aGC lineWidth.
+    prevLineStyle := aGC lineStyle.
+    prevJoinStyle := aGC joinStyle.
+    prevCapStyle  := aGC capStyle.
     prevFg := aGC paint.
 
     aGC lineWidth:lineWidth.
+    aGC lineStyle:lineStyle.
+    aGC joinStyle:joinStyle.
+    aGC capStyle:capStyle.
     aGC paint:fgColor.
 
     component displayStrokedOn:aGC.
 
     aGC lineWidth:prevLineWidth.
+    aGC lineStyle:prevLineStyle.
+    aGC joinStyle:prevJoinStyle.
+    aGC capStyle:prevCapStyle.
     aGC paint:prevFg.
 
     "Created: 8.5.1996 / 23:24:04 / cg"
@@ -173,5 +237,5 @@
 !StrokingWrapper class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/StrokingWrapper.st,v 1.5 1996-05-09 08:43:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/StrokingWrapper.st,v 1.6 1996-05-12 20:30:21 cg Exp $'
 ! !