DeviceGraphicsContext.st
changeset 2018 1ad552e97c67
parent 2016 bef5fe2ec2ca
child 2024 4ab032384c63
--- a/DeviceGraphicsContext.st	Mon Jan 26 19:00:13 1998 +0100
+++ b/DeviceGraphicsContext.st	Mon Jan 26 19:03:22 1998 +0100
@@ -557,6 +557,34 @@
     ]
 !
 
+maskOrigin:aPoint
+    "set the origin of the mask-pattern"
+
+    |x y|
+
+    x := aPoint x.
+    y := aPoint y.
+
+    (maskOrigin isNil or:[
+     ((x ~= maskOrigin x) or:[y ~= maskOrigin y]) ]) ifTrue:[
+
+        maskOrigin := aPoint.
+
+        transformation notNil ifTrue:[
+            x := transformation applyToX:x.
+            y := transformation applyToY:y.
+        ].
+        x := x rounded.
+        y := y rounded.
+
+        gcId notNil ifTrue:[
+            device setMaskOriginX:x y:y in:gcId
+        ]
+    ]
+
+    "Created: / 26.1.1998 / 19:03:02 / cg"
+!
+
 maskOriginX:orgX y:orgY
     "set the origin of the pattern"
 
@@ -3730,6 +3758,6 @@
 !DeviceGraphicsContext class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.52 1998-01-26 17:58:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceGraphicsContext.st,v 1.53 1998-01-26 18:03:22 cg Exp $'
 ! !
 DeviceGraphicsContext initialize!