Here is my test code:
dim obj as StringShape
dim p, p2 as Picture
dim size, textSize, depth as Integer
dim g as Graphics
dim doTransparent, doubleBuffer as boolean
g = OpenPrinterDialog
if g = nil then
return
end
textSize = 12
depth = 24
doTransparent = true
doubleBuffer = false
obj = new StringShape
obj.TextFont = "Helvetica"
obj.TextSize = textSize
obj.Rotation = 0.7853981633974483 // 45°
obj.text = "This is a sample string"
g.TextFont = "Helvetica"
g.TextSize = textSize
size = g.StringWidth(obj.text)
p = NewPicture(size*4,size*4,depth)
p2 = NewPicture(size*4,size*4,depth)
if doTransparent then
p.transparent = 1
end
obj.TextSize = obj.TextSize*4
p.Graphics.DrawObject obj,size*2,size*2
obj.TextSize = obj.TextSize/4
if doubleBuffer then
p2.graphics.DrawPicture p,0,0
if doTransparent then
p2.Transparent = 1
end
g.DrawPicture p2,200,200,size,size,0,0,p2.Width,p2.Height
else
g.DrawPicture p,200,200,size,size,0,0,p.Width,p.Height
end
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|