You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: unspecified Reported for operating system, platform: All, All
Comments on the original bug report:
On 2006-06-25 17:40:11 +0000, Samuel Mimram wrote:
Dear Developers!
Sometimes the "something" text is as wide as "somethingi". I wrote a line editor
for SDL, and it is a problem for me to determine the cursor position in pixels.
(I cannot say precisely the with of the text on the cursor's left side)
My wish is that the rendered surface be exactly as wide as the rendered text.
The second is that TTF_RenderText_Shaded() and TTF_RenderText_Solid() should have an "SDL_PixelFormat *format" parameter, so the newly generated surface would fit in the application instantly without any additional blitting.
I know it is not christmas so my third wish is very very optional. Make a
function with the name of TTF_RenderText_AlphaShaded(). It would be a mix of the
...Solid and the ...Shaded. The RGB channels would be filled with the ...Solid
algorythm and the Alpha channel would be filled with the ...Shaded algorythm. The result would be instant for blitting onto the screen. (The surface would be
always 32bit and the untouched areas of the surface would be transparent black)
Thanks for the TTF library! You saved my life ;-)
Thanks for reading my wishes!
I hope you will find useful the above.
A workaround: scan the resulting surface from left and from the right and find the x for the first non non-transparent pixel for each side. Subtracting those values from the width will give you the "true" width.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
Reported in version: unspecified
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2006-06-25 17:40:11 +0000, Samuel Mimram wrote:
On 2006-06-30 04:33:35 +0000, Nicos wrote:
The text was updated successfully, but these errors were encountered: