Hey Leledumbo,
At first I thought you were using some kind of online backend, but actually having this written in offline native Pascal expands the possibilities of practical usage to a different level. Great job!
Thank you very much for the compliment, but alas, I can't accept all the credit. I just adapted/copied the work of the original author:
Jens Borrisholt.
I think it deserves a place in online package manager.
That's an awesome endorsement!! Thanks!!!
But, IMHO, it needs some modifications/additions before I can consider bugging GetMem for a consideration to be put on OPM:
- Needs to be a visual component like TImage
- Needs to allow the user to chose some aspects of the font. The least of it like Serif vs Non Serif.
- Needs to allow the user to chose case sensitivity
- Needs to allow the user to choose alpha, numeric or alphanumeric
- The aspect ratio of the rectangle HAS to be maintained and some MinWidth/MinHeight should be imposed
- I need to see why if I compile it with optimization bigger than 1 it messes up the font size and rotation
With regards to 1, I'm a crappy component developer. I have no experience with it and I'm the last person to do it.
The original author had it descend from
TComponent already, but I downgraded it to descending from
TObject because I saw no functionality that would require it to descend from
TComponent.
If I'm to continue to expand on the development of this, I'll require some help, or at least some time to look at some examples and then adventure in the realm of true component development.
With regards to 2 to 4, this isn't that hard to implement once I have a grasp of the whole component thing.
With regards to 5, again, not that hard to implement, but I think it's needed to at least have a consistent canvas size to contain a good amount of places to put characters.
With regards to 6: This for me is Voodoo realm and I think I need to report a bug but I'm not completely sure. I've started
another thread where I'm discussing it.
My first problem was the background being black when I wanted it white. I finally found out how to do it but then I got an issue with the
TBitmap's
PixelFormat property and the place I set it. If I set it after setting the Brush/Pen it pretty much resets those and the background was still black. So the solution is setting that before setting Brush/Pen, but I still don't understand how setting
PixelFormat would reset the Brush/Pen setting
I'm now in the process of finding out why if the Optimization is not 1, then the rotation and size of the font is not obeyed.
Until I tackle those points, I guess I'll refrain from bugging GetMem for a place on OPM.
And I think I would have to make it a package, which ATM it isn't
Cheers,
Gus