WindowingTransformation.st
changeset 3532 4a16a9eaac9b
parent 3276 9ed39f7e7282
child 4162 08acaf50fad0
--- a/WindowingTransformation.st	Thu Oct 18 18:42:22 2001 +0200
+++ b/WindowingTransformation.st	Thu Oct 18 18:52:16 2001 +0200
@@ -19,6 +19,100 @@
 	category:'Graphics-Transformations'
 !
 
+!WindowingTransformation class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1992 by Claus Gittinger
+	      All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+    instances of WindowingTransformation can be used to scale, translate or
+    generally transform other objects in 2D space. 
+    They can also be set as the translation in a graphic context, 
+    which will then apply this to all of its drawing operations 
+    (see GraphicContext>>transformation:).
+
+    All 2-D objects are supposed to be able to be transformed using
+    instances of me.  Multiple instances of me can also be combined to form a
+    single composite transformation.
+
+    [Instance variables:]
+        scale           <Number> or <Point> representing a linear scaling factor.
+                        nil is interpreted as 1@1
+
+        translation     <Number> or <Point> representing a translation in 2-D.
+                        nil is interpreted as 0@0
+
+
+    [author:]
+        Claus Gittinger
+"
+
+    "Modified: 25.4.1996 / 16:53:07 / cg"
+!
+
+examples
+"
+    example (drawing in inches):
+                                                                        [exBegin]
+     |v|
+
+     v := View new realize.
+     (Delay forSeconds:3) wait.
+     v transformation:(WindowingTransformation unit:#inch on:Display).
+     'now, we can think of drawing in inches ...'.
+     v displayLineFrom:0.5@0.5 to:1@1 
+                                                                        [exEnd]
+
+
+    example (drawing in millimeters):
+                                                                        [exBegin]
+     |v|
+
+     v := View new realize.
+     (Delay forSeconds:3) wait.
+     v transformation:(WindowingTransformation unit:#mm on:Display).
+     'now, we can think of drawing in millimeters ...'.
+     v displayLineFrom:5@5 to:20@5 
+                                                                        [exEnd]
+
+
+    example (drawing magnified):
+                                                                        [exBegin]
+     |v|
+
+     v := View new realize.
+     (Delay forSeconds:3) wait.
+     v transformation:(WindowingTransformation scale:2 translation:0).
+     'now, everything is magnfied by 2'.
+     v displayLineFrom:10@10 to:30@30 
+                                                                        [exEnd]
+
+    example (drawing shrunk):
+                                                                        [exBegin]
+     |v|
+
+     v := View new realize.
+     (Delay forSeconds:3) wait.
+     v transformation:(WindowingTransformation scale:0.5 translation:0).
+     'now, everything is shrunk by 2'.
+     v displayLineFrom:10@10 to:30@30 
+                                                                        [exEnd]
+"
+
+    "Modified: 27.4.1996 / 19:45:43 / cg"
+! !
 
 !WindowingTransformation class methodsFor:'instance creation'!
 
@@ -161,101 +255,6 @@
     "
 ! !
 
-!WindowingTransformation class methodsFor:'documentation '!
-
-copyright
-"
- COPYRIGHT (c) 1992 by Claus Gittinger
-	      All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-!
-
-documentation
-"
-    instances of WindowingTransformation can be used to scale, translate or
-    generally transform other objects in 2D space. 
-    They can also be set as the translation in a graphic context, 
-    which will then apply this to all of its drawing operations 
-    (see GraphicContext>>transformation:).
-
-    All 2-D objects are supposed to be able to be transformed using
-    instances of me.  Multiple instances of me can also be combined to form a
-    single composite transformation.
-
-    [Instance variables:]
-        scale           <Number> or <Point> representing a linear scaling factor.
-                        nil is interpreted as 1@1
-
-        translation     <Number> or <Point> representing a translation in 2-D.
-                        nil is interpreted as 0@0
-
-
-    [author:]
-        Claus Gittinger
-"
-
-    "Modified: 25.4.1996 / 16:53:07 / cg"
-!
-
-examples
-"
-    example (drawing in inches):
-                                                                        [exBegin]
-     |v|
-
-     v := View new realize.
-     (Delay forSeconds:3) wait.
-     v transformation:(WindowingTransformation unit:#inch on:Display).
-     'now, we can think of drawing in inches ...'.
-     v displayLineFrom:0.5@0.5 to:1@1 
-                                                                        [exEnd]
-
-
-    example (drawing in millimeters):
-                                                                        [exBegin]
-     |v|
-
-     v := View new realize.
-     (Delay forSeconds:3) wait.
-     v transformation:(WindowingTransformation unit:#mm on:Display).
-     'now, we can think of drawing in millimeters ...'.
-     v displayLineFrom:5@5 to:20@5 
-                                                                        [exEnd]
-
-
-    example (drawing magnified):
-                                                                        [exBegin]
-     |v|
-
-     v := View new realize.
-     (Delay forSeconds:3) wait.
-     v transformation:(WindowingTransformation scale:2 translation:0).
-     'now, everything is magnfied by 2'.
-     v displayLineFrom:10@10 to:30@30 
-                                                                        [exEnd]
-
-    example (drawing shrunk):
-                                                                        [exBegin]
-     |v|
-
-     v := View new realize.
-     (Delay forSeconds:3) wait.
-     v transformation:(WindowingTransformation scale:0.5 translation:0).
-     'now, everything is shrunk by 2'.
-     v displayLineFrom:10@10 to:30@30 
-                                                                        [exEnd]
-"
-
-    "Modified: 27.4.1996 / 19:45:43 / cg"
-! !
-
 !WindowingTransformation methodsFor:'accessing'!
 
 scale
@@ -669,5 +668,5 @@
 !WindowingTransformation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowingTransformation.st,v 1.20 2000-08-31 10:04:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowingTransformation.st,v 1.21 2001-10-18 16:52:16 cg Exp $'
 ! !