--- a/GraphicsContext.st Wed May 07 20:27:21 2008 +0200
+++ b/GraphicsContext.st Thu May 08 11:58:01 2008 +0200
@@ -1905,22 +1905,23 @@
"/ a real string;
"/ do it in a monochrome form (for speed)
- w := font widthOf:aString .
+ w := font widthOf:aString.
h := font height.
descent := h - ascent.
tempForm := Form
width:w
height:h
+ depth:1
onDevice:device.
tempForm clear.
tempForm font:font.
+ tempForm paint:(Color colorId:1) on:(Color colorId:0).
tempForm displayString:aString x:0 y:ascent.
-
tempImage := (Depth1Image fromForm:tempForm) rotated:angle.
] ifFalse:[
- "/ something wierd (labelAndIcon ..)
+ "/ something weird (labelAndIcon ..)
"/ do it in a deep form.
"/ CAVEAT: this can only be done opaque ...
@@ -1967,18 +1968,17 @@
"/ the computation is somewhat more difficult here.
"/ remember: the image has been rotated around its center,
"/ then shifted towards the top-left origin.
-
p := (w@h) / 2.
r := p r.
a := p theta.
- sin := angle sin.
- cos := angle cos.
+ sin := angle degreesToRadians sin.
+ cos := angle degreesToRadians cos.
angle < 90 ifTrue:[
dX := descent * sin.
dY := ascent * cos.
xN := x - dX.
- yN := y - dY
+ yN := y - dY.
] ifFalse:[
angle < 180 ifTrue:[
dX := ascent * sin.
@@ -2436,7 +2436,7 @@
!GraphicsContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.119 2008-04-23 14:33:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GraphicsContext.st,v 1.120 2008-05-08 09:58:01 cg Exp $'
! !
GraphicsContext initialize!