DrawText
BlitzMax Forums/BlitzMax Programming/DrawText
| ||
does anyone know why the above happens? Its just the normal DrawText command. Ta! -Chris |
| ||
Hi, Maybe you are using SOLIDBLEND and the "Y: 160" line overlaps the line above? |
| ||
Thanks for the reply Just before the main loop of the program I set.. SetBlend AlphaBlend and thats the only blend setting I have. The vertical different between the "X:" line and the "Y:" line is the same as between the "Y:" and "Type:" lines so it seems odd that it doesnt do it for all of them (assuming this is the problem) At no point in the program do I change the font either |
| ||
I spy with my little eye that you have 15 px between "X:" and "Y:" and 16 px between "Y:" and "Type:" ... -- Byteemoz |
| ||
hmm maybe it is that then as far as the parameters given to the Drawtext command go the difference is always the same, i spose it could be the height the actual drawing of the font takes. That said, I've just increased the gap by a fair bit and I still get it... |
| ||
Ok, Ive shifted all of the items down a bit and the problem appears elsewhere the second from bottom input box should be UID, so the bottom of that is now getting cut off. At no point do I fill areas with black, so I havent a clue whats going on. The drawing positions are all int's as well. |
| ||
Are you able to reproduce it with a small code sample you can post? |
| ||
A few other ideas: 1. Do you use any scaling or rotation? 2. When and how are drawing these rectangles around the values? 3. Does that piece of code work? Graphics 800, 600 Repeat Cls For a = 0 To 10 DrawText "Type: 1234", 10, 10 + a * 16 Next Flip Until KeyHit(KEY_ESCAPE) Or AppTerminate() |
| ||
To me it looks like the DrawText block isn't the last thing of drawing operation thats applied to this given area, which will cause this problem as the last thing drawn will always be in front of everything else. |
| ||
Hey thanks for the replies everyone. Byte: no scaling or rotation. The rectangles are done with a hollow rect function I made... Function DrawBorder(xx,yy,width_in,height_in) width = width_in - 1 height = height_in - 1 x1 = xx x2 = xx+width y1 = yy y2 = yy+height DrawLine x1,y1,x2,y1 DrawLine x1,y1,x1,y2 DrawLine x2,y1,x2,y2 DrawLine x1,y2,x2,y2 End Function Even with this function disabled, it still does it. Your code worked fine too thank you. BlitzSupport: Nah I havent been able to reproduce it. This happens elsewhere and I even made sure it was the last thing drawn, using the code... DrawText "Screen Y: " + ScreenY,TileAreaX + 4,TileAreaY + 12 Thanks again you lot |
| ||
Ive had someone run the code on their PC and they dont have the same problem, so its just me apparently! thanks anyway! -Chris |
| ||
Haha, well I restarted my PC for a different reason, and the problem no longer exists O_o |