initial checkin
authorClaus Gittinger <cg@exept.de>
Fri, 19 Dec 2014 16:15:37 +0100
changeset 6668 1f4bae731ea7
parent 6667 2abb95c7f883
child 6669 5f4fa919b1f8
initial checkin
OrientedFillStyle.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrientedFillStyle.st	Fri Dec 19 16:15:37 2014 +0100
@@ -0,0 +1,65 @@
+"{ Package: 'stx:libview' }"
+
+FillStyle subclass:#OrientedFillStyle
+	instanceVariableNames:'form origin direction normal'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Graphics-Support'
+!
+
+!OrientedFillStyle class methodsFor:'documentation'!
+
+documentation
+"
+    an as-yet unused class.
+    For now, this is present as compatibility class (for Squeak),
+    but we may move change the fill/drawing code in the view hierarchy to use it later.
+
+    [author:]
+        cg
+
+    [instance variables:]
+
+    [class variables:]
+
+    [see also:]
+
+"
+! !
+
+!OrientedFillStyle methodsFor:'*Rome-Balloon'!
+
+installOnRomePluginCanvas: aCanvas
+
+	form asRomePluginSourceFormDuring: [ :f |
+		aCanvas primFillBitmapOriginX: origin x asFloat
+				 	y: origin y asFloat
+					directionX: direction x asFloat / f width
+					y: direction y asFloat / f height
+					normalX: self normal x asFloat / f width
+					y: self normal y asFloat / f height
+					repeat: self isTiled
+					image: f].
+
+!
+
+transformBy: aTransform
+	origin := aTransform transformPoint: self origin.
+	normal := aTransform transformDirection: self normal. "is lazy initialized and uses direction"
+	direction := aTransform transformDirection: self direction.
+!
+
+transformedBy: aTransform
+	^self copy transformBy: aTransform
+! !
+
+!OrientedFillStyle class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libview/OrientedFillStyle.st,v 1.1 2014-12-19 15:15:37 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libview/OrientedFillStyle.st,v 1.1 2014-12-19 15:15:37 cg Exp $'
+! !
+