Did you look up that thread I dated in my reply 11 hours ago. I found it a month ago when I needed to label a y-axis vertically and the rotated text printed as a black rectangle. Joe's solution there solves this problem.
Sub DrawVerticalString(g As graphics, Text1 As String, XPos As Integer, YPos As Integer, iScale As Integer=1) Dim StrSh as New StringShape Dim p as picture Dim h, w As Integer StrSh.Text=Text1 StrSh.TextFont="Times New Roman" StrSh.TextSize=app.DefFontSize*iScale StrSh.Rotation=ToRad(270) StrSh.FillColor=RGB(0,0,255) g.TextFont=StrSh.TextFont g.TextSize=StrSh.TextSize h=g.stringWidth(StrSh.Text) w=g.textHeight p=newPicture(w,h,32) p.graphics.DrawObject StrSh, 3*iScale+w/2, h/2 g.DrawPicture p, XPos-2*iScale-w/2, YPos-h/2 End Sub I have some custom variables/functions in there that are irrelevant but I'm sure you'll be able to work out what's relevant. On 2/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I came up with this rough example which seems to be a workaround for the > print bug where rotated text in stringshapes prints all black. However, > its pretty > inefficient - and noticably slow for larger bugger sizes. Does anyone have > a > better idea? > Greg > > //(g is passed in as a graphic object, p is a buffer) > dim p as Picture > dim xw, yh as integer > xw = 200 > yh = 40 > p = NewPicture( xw, yh, Screen(0).Depth) > If p <> Nil then > t = "FGRBK" // these characters are chosen because they are not > symmetrical > p.Graphics.TextSize = 21 > p.Graphics.ForeColor = &cffFF00 > p.Graphics.FillRect 0,0,p.Width,p.Height > p.Graphics.ForeColor = &cFF0000 > p.Graphics.DrawString t, 15, 20 > end if > // now loop pixel by pixel to transpose the graphic (note i,j in > opposite > orders) > for i = 0 to xw -1 > for j = 0 to yh-1 > g.DrawPicture p, 200 + j, 200 - i, 1, 1,i, j, 1, 1 > next > next > _______________________________________________ > > > -- > Paul Rehill > mathsteacher.com.au > RB 5.5.5 Mac Pro, Mac OS 10.3.6 > RB 5.5.5 Win Standard, Win XP SP2 > Plugins used: MBS > RealBasic resources: RB Developer, Matt Neuburg's RB book _______________________________________________ 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>
