Is there a bug with drawing text to images in B+?

BlitzPlus Forums/BlitzPlus Programming/Is there a bug with drawing text to images in B+?


How about making ssSetFont which takes your font parameters, stores them globally in your RotatedText unit and then sets the font for the current buffer. Then your RotatedText function can retrieve them when it needs to set the same font up for its buffer. You probably already thought of this though?

btw, do you know if DrawBlock is any faster than draw image for non-masked images?

I know you were trying to make a reusable function, but you could easily write a mini function to rotate by 90 degrees only and not use RotateImage function.



I know there are ways I could code AROUND the problems, but that misses the point of my post.

I shouldn't have to code around the problems, and coding around the problems makes messy code which is not as easy to reuse.

All versions of Blitz have had a problem for a very long time where Mark makes all these wonderful functions to set colors, brushes, camera zoom, fog distance, etc, and then he provides no way to get back that information... Which makes coding reusable functions that just work with no muss no fuss, a complete nightmare.

And it's not like it's hard to add these functions. They should have been put in place when the functions that set these values were first added.



btw, do you know if DrawBlock is any faster than draw image for non-masked images?



I don't know. Either one could be faster really. There's too many factors to consider. Like, are the draw operations hardware accelerated? Is it faster to not draw pixels than to draw them? Is the image mostly transparent, or mostly opaque? Is the image being drawn to video memory, or main ram? And if you're drawing the image manually, are you storing the images in RLE format, or are you check to see if each pixel is black before writing it?

The only way to know for sure would be to test, and you'd have to test on multiple hardware configs to be relatively confident in the results.

But I would say that if one is faster than the other, then DrawBlock is highly likely to be the faster of the two.